feat:刷新令牌的完整实现
This commit is contained in:
@@ -76,7 +76,10 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
|
||||
async function logout(redirect: boolean = true) {
|
||||
try {
|
||||
await logoutApi();
|
||||
const accessToken = accessStore.accessToken as string;
|
||||
if (accessToken) {
|
||||
await logoutApi(accessToken);
|
||||
}
|
||||
} catch {
|
||||
// 不做任何处理
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user