From 8e343110ef73fd5acb18cb1b9081512ae2c43d04 Mon Sep 17 00:00:00 2001 From: shizhongming Date: Thu, 29 Feb 2024 22:08:04 +0800 Subject: [PATCH] =?UTF-8?q?perf(=E8=AE=A4=E8=AF=81-=E7=99=BB=E5=BD=95):=20?= =?UTF-8?q?1=E3=80=81=E7=99=BB=E5=BD=95=E4=BF=A1=E6=81=AF=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E6=94=B9=E4=B8=BA=E4=BD=BF=E7=94=A8sessionStorage=202?= =?UTF-8?q?=E3=80=81=E7=99=BB=E5=87=BA=E7=A7=BB=E9=99=A4=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E6=9D=83=E9=99=90=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/settings/projectSetting.ts | 2 +- src/store/modules/user.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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);