fix: 修复退出登录问题

This commit is contained in:
caiyuchao committed 2025-01-08 19:22:21 +08:00
1 parent 4c709fdb95
commit 8e69a7ed7e
2 files changed
+3 -3

No files matched your search

@@ -22,7 +22,7 @@ function logout() {
okText: $t('common.confirm'),
cancelText: $t('common.cancel'),
onOk: () => {
authStore.resetStore();
authStore.resetStore(true);
}
});
}
+2 -2
View File
@@ -41,7 +41,7 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
*/
async function resetStore(isMe = false) {
if (isMe) {
doDeleteLogout();
await doDeleteLogout();
}
const authStore = useAuthStore();
@@ -70,10 +70,10 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
startLoading();
const { data: loginToken, error } = await fetchLogin(loginForm);
if (!error) {
const pass = await loginByToken(loginToken);
onSuccess && onSuccess();
if (pass) {
await routeStore.initAuthRoute();