From 1cb53e943ea99acb655100dcfaf743b01de1a09a Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 9 Jan 2026 23:13:06 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=B0=86=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E6=94=BE=E5=88=B0=E6=9C=80=E5=90=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playground/src/store/auth.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/playground/src/store/auth.ts b/playground/src/store/auth.ts index 1fec5c049..14100727d 100644 --- a/playground/src/store/auth.ts +++ b/playground/src/store/auth.ts @@ -89,21 +89,21 @@ export const useAuthStore = defineStore('auth', () => { resetAllStores(); accessStore.setLoginExpired(false); - - // 回登录页带上当前路由地址 - await router.replace({ - path: LOGIN_PATH, - query: redirect - ? { - redirect: encodeURIComponent(router.currentRoute.value.fullPath), - } - : {}, - }); } catch { // 不做任何处理 } finally { isLoggingOut.value = false; // 重置 标识 } + + // 回登录页带上当前路由地址 + await router.replace({ + path: LOGIN_PATH, + query: redirect + ? { + redirect: encodeURIComponent(router.currentRoute.value.fullPath), + } + : {}, + }); } async function fetchUserInfo() {