Commit 2183ef13ec648d9a500d3d96837404246195b015

Authored by ww
1 parent 732bfe1d

fix: 修复页面可能存在死循环调用请求用户权限的接口

@@ -224,7 +224,7 @@ export const usePermissionStore = defineStore({ @@ -224,7 +224,7 @@ export const usePermissionStore = defineStore({
224 // !Simulate to obtain permission codes from the background, 224 // !Simulate to obtain permission codes from the background,
225 // this function may only need to be executed once, and the actual project can be put at the right time by itself 225 // this function may only need to be executed once, and the actual project can be put at the right time by itself
226 let routeList: AppRouteRecordRaw[] = []; 226 let routeList: AppRouteRecordRaw[] = [];
227 - const userInfo: any = getAuthCache(USER_INFO_KEY); 227 + const userInfo: any = getAuthCache(USER_INFO_KEY) || { roles: [] };
228 const filterMenu = (allMenuList, menuIdsList) => { 228 const filterMenu = (allMenuList, menuIdsList) => {
229 return allMenuList 229 return allMenuList
230 .filter((item) => { 230 .filter((item) => {