fix:刷新令牌过期后,直接访问 /login 会报错的问题,对应 issue:https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues/ID9FLI
parent
932255bd14
commit
1b85de732b
|
|
@ -64,12 +64,13 @@ router.beforeEach(async (to, from, next) => {
|
|||
if (to.path === '/login') {
|
||||
next({ path: '/' })
|
||||
} else {
|
||||
// 获取所有字典
|
||||
const dictStore = useDictStoreWithOut()
|
||||
const userStore = useUserStoreWithOut()
|
||||
const permissionStore = usePermissionStoreWithOut()
|
||||
// 异步加载字典
|
||||
// 另外,间接 issue:https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues/ID9FLI
|
||||
if (!dictStore.getIsSetDict) {
|
||||
await dictStore.setDictMap()
|
||||
dictStore.setDictMap().then()
|
||||
}
|
||||
if (!userStore.getIsSetUser) {
|
||||
isRelogin.show = true
|
||||
|
|
|
|||
Loading…
Reference in New Issue