From cbc504cc0ba7e0fc17bde5a6f270f1f43f4135e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?piexlMax=28=E5=A5=87=E6=B7=BC?= Date: Mon, 19 May 2025 14:43:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E6=88=B7=E6=A8=A1=E5=9D=97):=20?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=B8=85=E7=90=86=E5=AD=98=E5=82=A8=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BB=A5=E6=AD=A3=E7=A1=AE=E5=88=A0=E9=99=A4cookie?= =?UTF-8?q?=E5=92=8ClocalStorage=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pinia/modules/user.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/pinia/modules/user.js b/web/src/pinia/modules/user.js index 61a7d09a..a36896bd 100644 --- a/web/src/pinia/modules/user.js +++ b/web/src/pinia/modules/user.js @@ -128,9 +128,12 @@ export const useUserStore = defineStore('user', () => { /* 清理数据 */ const ClearStorage = async () => { token.value = '' - xToken.value = '' + // 使用remove方法正确删除cookie + xToken.remove() sessionStorage.clear() + // 清理所有相关的localStorage项 localStorage.removeItem('originSetting') + localStorage.removeItem('token') } return {