forked from AkkomaGang/admin-fe
fixed: catch 'GetInfo' exception
This commit is contained in:
parent
96b100d33c
commit
4467420d31
1 changed files with 4 additions and 0 deletions
|
@ -55,6 +55,10 @@ router.beforeEach((to, from, next) => {
|
|||
router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表
|
||||
next({ ...to }); // hack方法 确保addRoutes已完成
|
||||
})
|
||||
}).catch(() => {
|
||||
store.dispatch('FedLogOut').then(() => {
|
||||
next({ path: '/login' });
|
||||
})
|
||||
})
|
||||
} else {
|
||||
// 没有动态改变权限的需求可直接next() 删除下方权限判断 ↓
|
||||
|
|
Loading…
Reference in a new issue