improve point functions

This commit is contained in:
2024-03-13 21:08:55 +08:00
parent c3444c1cc8
commit 87df8d5966
7 changed files with 111 additions and 44 deletions

View File

@@ -120,6 +120,12 @@ export const useAuthStore = defineStore('BiliAuth', () => {
}
return []
}
function logout() {
biliAuth.value = {} as BiliAuthModel
biliTokens.value = biliTokens.value.filter((t) => t.token != currentToken.value)
currentToken.value = ''
console.log('[bili-auth] 已登出 Bilibili 认证')
}
return {
biliAuth,
@@ -134,5 +140,6 @@ export const useAuthStore = defineStore('BiliAuth', () => {
GetSpecificPoint,
GetGoods,
setCurrentAuth,
logout,
}
})