mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-08-05 13:44:08 +08:00
🐞 fix:修复从“同时使用了用户信息和权限判断”的页面退出登录时异常问题
This commit is contained in:
@@ -35,8 +35,9 @@ export const usePermissionStore = defineStore('permission', {
|
||||
return new Promise<void>(async (resolve) => {
|
||||
// 获得菜单列表,它在登录的时候,setUserInfoAction 方法中已经进行获取
|
||||
let res: AppCustomRouteRecordRaw[] = []
|
||||
if (wsCache.get(CACHE_KEY.ROLE_ROUTERS)) {
|
||||
res = wsCache.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[]
|
||||
const roleRouters = wsCache.get(CACHE_KEY.ROLE_ROUTERS)
|
||||
if (roleRouters) {
|
||||
res = roleRouters as AppCustomRouteRecordRaw[]
|
||||
}
|
||||
const routerMap: AppRouteRecordRaw[] = generateRoute(res)
|
||||
// 动态路由,404一定要放到最后面
|
||||
|
Reference in New Issue
Block a user