mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
feat: 替换认证存储逻辑为BiliAuth
- 将所有使用useAuthStore的地方替换为useBiliAuth - 删除useAuthStore文件,整合认证逻辑 - 更新相关视图和组件以适应新的认证存储
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { GetSelfAccount, useAccount, UpdateAccountLoop } from "@/api/account";
|
||||
import { QueryGetAPI } from "@/api/query";
|
||||
import { useAuthStore } from "@/store/useAuthStore";
|
||||
import { useBiliAuth } from "@/store/useBiliAuth";
|
||||
import { useNotificationStore } from "@/store/useNotificationStore";
|
||||
import { createDiscreteApi, NText, NFlex, NButton } from "naive-ui";
|
||||
import { BASE_API_URL, isTauri, apiFail } from "./constants";
|
||||
@@ -64,7 +64,7 @@ async function InitOther() {
|
||||
InitTTS()
|
||||
await GetSelfAccount()
|
||||
const account = useAccount()
|
||||
const useAuth = useAuthStore()
|
||||
const useAuth = useBiliAuth()
|
||||
if (account.value.id) {
|
||||
if (account.value.biliUserAuthInfo && !useAuth.currentToken) {
|
||||
useAuth.currentToken = account.value.biliUserAuthInfo.token
|
||||
|
||||
Reference in New Issue
Block a user