From bea54871808501f735f5b9f4e5a4020662560508 Mon Sep 17 00:00:00 2001 From: tao Date: Tue, 30 Dec 2025 15:42:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7=E7=99=BB?= =?UTF-8?q?=E5=BD=95=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/auth.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/store/auth.ts b/src/store/auth.ts index 13913a0..37c0816 100644 --- a/src/store/auth.ts +++ b/src/store/auth.ts @@ -29,14 +29,19 @@ export const useAuthStore = defineStore("auth", () => { duration: 3, }); + let userInfo = {}; if (rememberMe) { - userStore.setUserInfo({ + userInfo = { ...params, rememberMe - }); + }; } else { - userStore.clearUserInfo(); + userInfo = { + username: params.username + }; } + userStore.clearUserInfo(); + userStore.setUserInfo(userInfo); const redirect = route.query.redirect || "/"; router.replace(redirect as string); return res;