update domain

This commit is contained in:
2023-10-22 10:14:27 +08:00
parent 989b562322
commit d5d719f168
9 changed files with 80 additions and 52 deletions

View File

@@ -2,13 +2,13 @@
import { useAccount } from '@/api/account'
import { QueryGetAPI } from '@/api/query'
import { HISTORY_API_URL } from '@/data/constants'
import { NAlert, NCard, NSpace, useMessage } from 'naive-ui'
import { NAlert, NCard, NSpace, NSpin, useMessage } from 'naive-ui'
import { onMounted, ref } from 'vue'
import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { LineChart } from 'echarts/charts'
import { TitleComponent, TooltipComponent, LegendComponent, GridComponent, DataZoomComponent } from 'echarts/components'
import VChart, { THEME_KEY } from 'vue-echarts'
import VChart from 'vue-echarts'
import { format } from 'date-fns'
use([CanvasRenderer, LineChart, TitleComponent, TooltipComponent, LegendComponent, GridComponent, DataZoomComponent, LineChart])
@@ -24,6 +24,8 @@ const guardsOption = ref()
const upstatViewOption = ref()
const upstatLikeOption = ref()
const isLoading = ref(true)
async function getFansHistory() {
await QueryGetAPI<
{
@@ -405,13 +407,15 @@ onMounted(async () => {
await getGuardsHistory()
await getUpstatHistory()
getOptions()
isLoading.value = false
}
})
</script>
<template>
<NAlert v-if="accountInfo?.isBiliVerified != true" type="info"> 尚未进行Bilibili认证 </NAlert>
<NCard size="small">
<NSpin v-else-if="isLoading" show/>
<NCard v-else size="small">
<NSpace vertical>
<VChart :option="fansOption" style="height: 200px" />
<VChart :option="guardsOption" style="height: 200px" />