feat: 未登录情况下防止进入路由死循环
This commit is contained in:
parent
e9dd55f4f9
commit
e8eacb02d6
|
|
@ -90,7 +90,9 @@ router.beforeEach(async (to, from) => {
|
|||
if(!routerStore.asyncRouterFlag){
|
||||
await setupRouter(userStore)
|
||||
}
|
||||
return { name: userStore.userInfo.authority.defaultRouter }
|
||||
if(userStore.userInfo.authority.defaultRouter){
|
||||
return { name: userStore.userInfo.authority.defaultRouter }
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue