Commit a22942d1 authored by 张伯涛's avatar 张伯涛

修改

parent c3150872
...@@ -50,7 +50,10 @@ router.beforeEach((to, from, next) => { ...@@ -50,7 +50,10 @@ router.beforeEach((to, from, next) => {
} }
}) })
router.addRoutes(routers.accessedRoutes) // 动态添加可访问路由表 router.addRoutes(routers.accessedRoutes) // 动态添加可访问路由表
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 console.log('...to', to)
console.log('routers.accessedRoutes', routers.accessedRoutes)
next({ path: routers.accessedRoutes[0].children[0].path, replace: true }) // 没有首页,自动切换跳转到下一级
// next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
} else { } else {
Message.error('用户无权限') Message.error('用户无权限')
store.dispatch('FedLogOut').then(() => { store.dispatch('FedLogOut').then(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment