fix: 统一管理后台 401 与加载失败处理
This commit is contained in:
@@ -32,5 +32,9 @@ export const useAuthStore = defineStore("auth", () => {
|
||||
}
|
||||
}
|
||||
|
||||
return { username, ready, isLoggedIn, hydrate, login, logout };
|
||||
function clearSession() {
|
||||
username.value = null;
|
||||
}
|
||||
|
||||
return { username, ready, isLoggedIn, hydrate, login, logout, clearSession };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user