Skip to content

Commit 4467420

Browse files
ginhomPanJiaChen
authored andcommitted
fixed: catch 'GetInfo' exception
1 parent 96b100d commit 4467420

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ router.beforeEach((to, from, next) => {
5555
router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表
5656
next({ ...to }); // hack方法 确保addRoutes已完成
5757
})
58+
}).catch(() => {
59+
store.dispatch('FedLogOut').then(() => {
60+
next({ path: '/login' });
61+
})
5862
})
5963
} else {
6064
// 没有动态改变权限的需求可直接next() 删除下方权限判断 ↓

0 commit comments

Comments
 (0)