refactor: 更新API接口与数据结构,统一分页返回格式

This commit is contained in:
Ray.Hao
2026-01-09 00:07:25 +08:00
parent 4a8efc770e
commit a5885d0710
64 changed files with 1085 additions and 910 deletions

View File

@@ -359,7 +359,7 @@ defineOptions({
import { dayjs } from "element-plus";
import { ref } from "vue";
import StatisticsAPI from "@/api/system/statistics";
import type { VisitStatsVo, VisitTrendVo } from "@/types/api";
import type { VisitStatsDetail, VisitTrendDetail } from "@/types/api";
import { useUserStore } from "@/store/modules/user";
import { formatGrowthRate } from "@/utils";
import { useTransition, useDateFormat } from "@vueuse/core";
@@ -447,7 +447,7 @@ const greetings = computed(() => {
// 访客统计数据加载状态
const visitStatsLoading = ref(true);
// 访客统计数据
const visitStatsData = ref<VisitStatsVo>({
const visitStatsData = ref<VisitStatsDetail>({
todayUvCount: 0,
uvGrowthRate: 0,
totalUvCount: 0,
@@ -543,7 +543,7 @@ const fetchVisitTrendData = () => {
*
* @param data - 访问趋势数据
*/
const updateVisitTrendChartOptions = (data: VisitTrendVo) => {
const updateVisitTrendChartOptions = (data: VisitTrendDetail) => {
visitTrendChartOptions.value = {
tooltip: {
trigger: "axis",