|
@@ -24,7 +24,6 @@ router.beforeEach((to, from, next) => {
|
|
.dispatch('GetInfo')
|
|
.dispatch('GetInfo')
|
|
.then(() => {
|
|
.then(() => {
|
|
store.dispatch('GenerateRoutes').then((accessRoutes) => {
|
|
store.dispatch('GenerateRoutes').then((accessRoutes) => {
|
|
- next()
|
|
|
|
// 根据roles权限生成可访问的路由表
|
|
// 根据roles权限生成可访问的路由表
|
|
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
|
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
|
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
|
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|