aafe48ad by 任超

style:路由权限

1 parent 0f988045
...@@ -24,7 +24,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -24,7 +24,7 @@ router.beforeEach(async (to, from, next) => {
24 const accessRoutes = await store.dispatch('permission/generateRoutes', getMenuData) 24 const accessRoutes = await store.dispatch('permission/generateRoutes', getMenuData)
25 router.addRoutes([...accessRoutes, { path: '*', redirect: '/404', hidden: true }]) 25 router.addRoutes([...accessRoutes, { path: '*', redirect: '/404', hidden: true }])
26 const routeTo = Cookies.get('routerTo') 26 const routeTo = Cookies.get('routerTo')
27 if (routeTo) { 27 if (routeTo && routeTo !== '/') {
28 next({ ...to, replace: true }) 28 next({ ...to, replace: true })
29 } else { 29 } else {
30 next('/home') 30 next('/home')
......