aafe48ad by 任超

style:路由权限

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