diff --git a/src/settings/projectSetting.ts b/src/settings/projectSetting.ts index 3f1e990e5..d885e27a3 100644 --- a/src/settings/projectSetting.ts +++ b/src/settings/projectSetting.ts @@ -31,7 +31,7 @@ const setting: ProjectConfig = { permissionMode: PermissionModeEnum.BACK, // Permission-related cache is stored in sessionStorage or localStorage - permissionCacheType: CacheTypeEnum.LOCAL, + permissionCacheType: CacheTypeEnum.SESSION, // Session timeout processing sessionTimeoutProcessing: SessionTimeoutProcessingEnum.ROUTE_JUMP, diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 95c4c6e43..b7ff6defc 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -157,8 +157,11 @@ export const useUserStore = defineStore({ } } this.setToken(undefined); + this.setRoleList([]); this.setSessionTimeout(false); this.setUserInfo(null); + const permissionStore = usePermissionStore(); + permissionStore.setPermCodeList([]); if (goLogin) { // 直接回登陆页 router.replace(PageEnum.BASE_LOGIN);