mirror of
https://gitee.com/yudaocode/yudao-ui-admin-vue3.git
synced 2025-12-30 01:22:27 +00:00
fix:刷新令牌过期后,直接访问 /login 会报错的问题,对应 issue:https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues/ID9FLI
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user