feat(ops): add rich analytics charts for overview, health, and payments pages

This commit is contained in:
2569718930@qq.com
2026-05-20 09:48:12 +08:00
parent 4de009b401
commit 5e4070ad27
4 changed files with 181 additions and 23 deletions
+6
View File
@@ -64,6 +64,12 @@ export const opsApi = {
memberships() {
return opsFetch<Record<string, unknown>>("/api/ops/memberships?limit=200");
},
membershipsGrowth(days = 90) {
return opsFetch<{
days: number;
daily: { date: string; trial: number; paid: number; total: number; cumulative: number }[];
}>(`/api/ops/memberships/growth?days=${days}`);
},
incidents(limit = 20, reason?: string) {
const params = new URLSearchParams({ limit: String(limit) });
if (reason) params.set("reason", reason);