style:路由权限
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -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') | ... | ... |
-
Please register or sign in to post a comment