Browse Source

页面刷新404问题修改

ysc 1 year ago
parent
commit
2bb4a8546e
2 changed files with 5 additions and 65 deletions
  1. 1 1
      package.json
  2. 4 64
      src/router/index.js

+ 1 - 1
package.json

@@ -22,7 +22,7 @@
     "nprogress": "0.2.0",
     "nprogress": "0.2.0",
     "path-to-regexp": "2.4.0",
     "path-to-regexp": "2.4.0",
     "vue": "2.6.10",
     "vue": "2.6.10",
-    "vue-router": "3.0.6",
+    "vue-router": "3.4.9",
     "vuex": "3.1.0",
     "vuex": "3.1.0",
     "@riophae/vue-treeselect": "0.4.0",
     "@riophae/vue-treeselect": "0.4.0",
     "moment": "^2.29.4"
     "moment": "^2.29.4"

+ 4 - 64
src/router/index.js

@@ -53,74 +53,14 @@ export const constantRoutes = [
       component: () => import('@/views/dashboard/index'),
       component: () => import('@/views/dashboard/index'),
       meta: {title: 'Dashboard', icon: 'dashboard'}
       meta: {title: 'Dashboard', icon: 'dashboard'}
     }]
     }]
-  },
-
-  {
-    path:'/weekly',
-    name: 'Weekly',
-    component:()=>import('@/views/meeting/weekly')
-  },
-  {
-    path: '/weeklyRecords',
-    name: 'WeeklyRecords',
-    component:()=>import('@/views/meeting/weeklyRecords')
-  },
-  {
-    path: '/enforceflow',
-    name: 'EnforceFlow',
-    component:()=>import('@/views/enforceflow/enforceflow')
-  },
-  {
-    path: '/enforceflowdetail',
-    name: 'EnforceFlowDetail',
-    component:()=>import('@/views/enforceflow/enforceflowdetail')
-  },
-  {
-    path: '/workbench',
-    name: 'Workbench',
-    component:()=>import('@/views/workbench/workbench')
-  },
-
-  // {
-  //   path: '/system',
-  //   component: Layout,
-  //   redirect: '/system/menu',
-  //   name: '系统管理',
-  //   meta: {title: 'Example', icon: 'el-icon-s-help'},
-  //   children: [
-  //     {
-  //       path: 'menu',
-  //       name: '菜单管理',
-  //       component: () => import('@/views/system/menu'),
-  //       meta: {title: '菜单管理', icon: 'table'}
-  //     },
-  //     {
-  //       path: 'dept',
-  //       name: '部门管理',
-  //       component: () => import('@/views/system/dept'),
-  //       meta: {title: '部门管理', icon: 'task'}
-  //     },
-  //     {
-  //       path: 'role',
-  //       name: '角色管理',
-  //       component: () => import('@/views/system/role'),
-  //       meta: {title: '角色管理', icon: 'task'}
-  //     },
-  //     {
-  //       path: 'user',
-  //       name: '员工管理',
-  //       component: () => import('@/views/system/user'),
-  //       meta: {title: '员工管理', icon: 'task'}
-  //     }
-  //   ]
-  // },
+  }
 
 
-  // 404 page must be placed at the end !!!
-  {path: '*', redirect: '/404', hidden: true}
 ]
 ]
 
 
 // 动态路由,基于用户权限动态去加载
 // 动态路由,基于用户权限动态去加载
-export const dynamicRoutes = []
+export const dynamicRoutes = [
+  {path: '*', redirect: '/404', hidden: true}
+]
 
 
 // 防止连续点击多次路由报错
 // 防止连续点击多次路由报错
 let routerPush = Router.prototype.push;
 let routerPush = Router.prototype.push;