作者 dong

首页修改

... ... @@ -71,6 +71,7 @@
type: Object,
default: () => ({
todayCount: 0,
earliestTime: 0,
rejectedCount: 0,
totalCount: 0,
averageCount: 0,
... ... @@ -191,14 +192,14 @@
}
// 使用解构确保响应式依赖
const { todayCount, rejectedCount, totalCount, growthRate } = props.statistics;
const { todayCount, rejectedCount, totalCount, growthRate, earliestTime } = props.statistics;
return [
{
title: '累计问答次数',
icon: 'visit-count|svg',
total: totalCount || 0,
tooltip: '系统所有问答记录,从2025年7月1日开始的第一次问答至今所有累计:' + totalCount,
tooltip: `系统所有问答记录,从${earliestTime}开始的第一次问答至今所有累计:` + totalCount,
},
{
title: '今日问答次数',
... ...
... ... @@ -48,6 +48,7 @@
// 使用实时数据对象
const statistics = ref({
todayCount: 0,
earliestTime: '',
yesterdayCount: 0,
growthRate: 0,
rejectedCount: 0,
... ... @@ -101,6 +102,7 @@
// 直接使用响应数据,不检查 success 属性
statistics.value = {
todayCount: res.todayCount || res.data?.todayCount || 0,
earliestTime: res.earliestTime || '',
yesterdayCount: res.yesterdayCount || 0,
growthRate: res.growthRate || 0,
rejectedCount: res.rejectedCount || res.data?.rejectedCount || 0,
... ...