refactor: move cleanup to finally block

pull/324/head
eric 2026-01-09 23:22:49 +08:00
parent 1cb53e943e
commit 694396dcfb
1 changed files with 3 additions and 3 deletions

View File

@ -86,13 +86,13 @@ export const useAuthStore = defineStore('auth', () => {
try {
await logoutApi();
resetAllStores();
accessStore.setLoginExpired(false);
} catch {
// 不做任何处理
} finally {
isLoggingOut.value = false; // 重置 标识
resetAllStores();
accessStore.setLoginExpired(false);
}
// 回登录页带上当前路由地址