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:
@@ -11,7 +11,7 @@ import {
|
||||
import AddressDisplay from '@/components/manage/AddressDisplay.vue'
|
||||
import PointGoodsItem from '@/components/manage/PointGoodsItem.vue'
|
||||
import { POINT_API_URL } from '@/data/constants'
|
||||
import { useAuthStore } from '@/store/useAuthStore'
|
||||
import { useBiliAuth } from '@/store/useBiliAuth'
|
||||
import {
|
||||
NAlert,
|
||||
NButton,
|
||||
@@ -43,7 +43,7 @@ const props = defineProps<{
|
||||
}>()
|
||||
const router = useRouter()
|
||||
|
||||
const useAuth = useAuthStore()
|
||||
const useAuth = useBiliAuth()
|
||||
// 移除未使用的 accountInfo
|
||||
const isLoading = ref(false)
|
||||
const message = useMessage()
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
import { ResponsePointOrder2UserModel } from '@/api/api-models'
|
||||
import PointOrderCard from '@/components/manage/PointOrderCard.vue'
|
||||
import { POINT_API_URL } from '@/data/constants'
|
||||
import { useAuthStore } from '@/store/useAuthStore'
|
||||
import { useBiliAuth } from '@/store/useBiliAuth'
|
||||
import { NButton, NEmpty, NFlex, NSpin, useMessage } from 'naive-ui'
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
const message = useMessage()
|
||||
const useAuth = useAuthStore()
|
||||
const useAuth = useBiliAuth()
|
||||
|
||||
const orders = ref<ResponsePointOrder2UserModel[]>([])
|
||||
const isLoading = ref(false)
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
import { ResponsePointHisrotyModel } from '@/api/api-models'
|
||||
import PointHistoryCard from '@/components/manage/PointHistoryCard.vue'
|
||||
import { POINT_API_URL } from '@/data/constants'
|
||||
import { useAuthStore } from '@/store/useAuthStore'
|
||||
import { useBiliAuth } from '@/store/useBiliAuth'
|
||||
import { NButton, NEmpty, NFlex, NSpin, useMessage } from 'naive-ui'
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
const message = useMessage()
|
||||
const useAuth = useAuthStore()
|
||||
const useAuth = useBiliAuth()
|
||||
const isLoading = ref(false)
|
||||
|
||||
const history = ref<ResponsePointHisrotyModel[]>([])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { UserInfo } from '@/api/api-models'
|
||||
import { POINT_API_URL } from '@/data/constants'
|
||||
import { useAuthStore } from '@/store/useAuthStore'
|
||||
import { useBiliAuth } from '@/store/useBiliAuth'
|
||||
import { useRouteHash } from '@vueuse/router'
|
||||
import {
|
||||
NAlert,
|
||||
@@ -48,7 +48,7 @@ interface SettingsViewInstance extends ComponentWithReset {
|
||||
// 设置组件可能需要的方法
|
||||
}
|
||||
|
||||
const useAuth = useAuthStore()
|
||||
const useAuth = useBiliAuth()
|
||||
const message = useMessage()
|
||||
const realHash = useRouteHash('points', {
|
||||
mode: 'replace',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { AddressInfo } from '@/api/api-models'
|
||||
import AddressDisplay from '@/components/manage/AddressDisplay.vue'
|
||||
import { CURRENT_HOST, POINT_API_URL, THINGS_URL } from '@/data/constants'
|
||||
import { useAuthStore } from '@/store/useAuthStore'
|
||||
import { useBiliAuth } from '@/store/useBiliAuth'
|
||||
import { useStorage } from '@vueuse/core'
|
||||
import {
|
||||
FormRules,
|
||||
@@ -41,7 +41,7 @@ type AreaData = {
|
||||
}
|
||||
}
|
||||
|
||||
const useAuth = useAuthStore()
|
||||
const useAuth = useBiliAuth()
|
||||
const message = useMessage()
|
||||
const isLoading = ref(false)
|
||||
const userAgree = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user