diff --git a/tenant-platform/src/api/bugcollect.ts b/tenant-platform/src/api/bugcollect.ts index c2ec334..1731ef0 100644 --- a/tenant-platform/src/api/bugcollect.ts +++ b/tenant-platform/src/api/bugcollect.ts @@ -162,7 +162,7 @@ export const bugCollectApi = { }, issueTrend(id: string | number, params?: { from?: string; to?: string }) { - return client.get<{ data: { date: string; count: number; affectedUsers: number }[] }>( + return client.get<{ data: { issueId: number; points: { date: string; count: number; affectedUsers: number }[] } }>( `/bugcollect/v1/issues/${id}/trend`, { params }, ) diff --git a/tenant-platform/src/views/bug-collect/BugCollectIssueDetail.vue b/tenant-platform/src/views/bug-collect/BugCollectIssueDetail.vue index ba9b0f9..6b60588 100644 --- a/tenant-platform/src/views/bug-collect/BugCollectIssueDetail.vue +++ b/tenant-platform/src/views/bug-collect/BugCollectIssueDetail.vue @@ -241,7 +241,7 @@ async function loadTrend() { if (!id || !trendChartRef.value) return try { const res = await bugCollectApi.issueTrend(id) - const trend = res.data.data + const trend = res.data.data?.points if (!trend || !trendChartRef.value) return if (!trendChart) trendChart = echarts.init(trendChartRef.value)