fixed: catch 'GetInfo' exception

This commit is contained in:
ginhom 2017-07-25 15:56:14 +08:00 committed by 花裤衩
parent 96b100d33c
commit 4467420d31

View file

@ -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() 删除下方权限判断 ↓