From a03a2e88fdfd742f3f488b4cc18c4d5d67874a3b Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Mon, 27 May 2024 18:05:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E9=A1=B5=E7=AD=BE=E4=B9=8B=E9=97=B4=E8=AE=A4=E8=AF=81=E5=85=B1?= =?UTF-8?q?=E4=BA=AB=E9=97=AE=E9=A2=98=20(#558)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/stores/modules/application.ts | 2 +- ui/src/stores/modules/user.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/stores/modules/application.ts b/ui/src/stores/modules/application.ts index 49ce795fe..bb37a17c3 100644 --- a/ui/src/stores/modules/application.ts +++ b/ui/src/stores/modules/application.ts @@ -65,7 +65,7 @@ const useApplicationStore = defineStore({ applicationApi .postAppAuthentication(token, loading) .then((res) => { - localStorage.setItem('accessToken', res.data) + sessionStorage.setItem('accessToken', res.data) resolve(res) }) .catch((error) => { diff --git a/ui/src/stores/modules/user.ts b/ui/src/stores/modules/user.ts index f4c0a1463..ac47a7974 100644 --- a/ui/src/stores/modules/user.ts +++ b/ui/src/stores/modules/user.ts @@ -24,7 +24,7 @@ const useUserStore = defineStore({ } return this.userType === 1 ? localStorage.getItem('token') - : localStorage.getItem('accessToken') + : sessionStorage.getItem('accessToken') }, getPermissions() {