mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-28 04:13:22 +08:00
refactor: move cleanup to finally block
This commit is contained in:
@@ -86,13 +86,13 @@ export const useAuthStore = defineStore('auth', () => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await logoutApi();
|
await logoutApi();
|
||||||
|
|
||||||
resetAllStores();
|
|
||||||
accessStore.setLoginExpired(false);
|
|
||||||
} catch {
|
} catch {
|
||||||
// 不做任何处理
|
// 不做任何处理
|
||||||
} finally {
|
} finally {
|
||||||
isLoggingOut.value = false; // 重置 标识
|
isLoggingOut.value = false; // 重置 标识
|
||||||
|
|
||||||
|
resetAllStores();
|
||||||
|
accessStore.setLoginExpired(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 回登录页带上当前路由地址
|
// 回登录页带上当前路由地址
|
||||||
|
|||||||
Reference in New Issue
Block a user