feat(analytics): 新增统计接口并迁移首页看板

- 新增访问汇总、访问趋势、用户汇总接口封装
- 首页看板改用新接口并解析趋势数据点
- 移除日志 API 中的旧统计方法与类型
This commit is contained in:
Ray.Hao committed 2026-11-24 09:20:33 +08:00
1 parent 38189e5fdf
commit 4c4e12d335
8 files changed
+199 -144

No files matched your search

-38
View File
@@ -164,42 +164,4 @@ export default defineMock([
msg: "一切ok",
},
},
{
url: "logs/analytics/trend",
method: ["GET"],
body: {
code: "00000",
data: {
dates: [
"2024-06-30",
"2024-07-01",
"2024-07-02",
"2024-07-03",
"2024-07-04",
"2024-07-05",
"2024-07-06",
"2024-07-07",
],
pvList: [1751, 5168, 4882, 5301, 4721, 4885, 1901, 1003],
uvList: [207, 566, 565, 631, 579, 496, 222, 152],
},
msg: "一切ok",
},
},
{
url: "logs/analytics/overview",
method: ["GET"],
body: {
code: "00000",
data: {
todayUvCount: 169,
totalUvCount: 19985,
uvGrowthRate: -0.57,
todayPvCount: 1629,
totalPvCount: 286086,
pvGrowthRate: -0.65,
},
msg: "一切ok",
},
},
]);