fix: 修复首页统计数据字段映射错误

修正后端API字段名称:
- pass_rate_growth → monthly_pass_rate_growth
- issues_detected → monthly_detected_issues
- issues_growth → monthly_issues_growth

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-26 18:55:46 +08:00
parent c491ad228c
commit e4e1757977
+8 -8
View File
@@ -88,12 +88,12 @@ interface BackendStatisticsResponse {
is_up: boolean;
};
monthly_pass_rate: number;
pass_rate_growth: {
monthly_pass_rate_growth: {
value: number;
is_up: boolean;
};
issues_detected: number;
issues_growth: {
monthly_detected_issues: number;
monthly_issues_growth: {
value: number;
is_up: boolean;
};
@@ -172,13 +172,13 @@ export async function getHomeData(reviewType?: string | null, userId?: string |
},
monthlyPassRate: backendData.monthly_pass_rate,
passRateGrowth: {
value: backendData.pass_rate_growth.value,
isUp: backendData.pass_rate_growth.is_up
value: backendData.monthly_pass_rate_growth.value,
isUp: backendData.monthly_pass_rate_growth.is_up
},
issuesDetected: backendData.issues_detected,
issuesDetected: backendData.monthly_detected_issues,
issuesGrowth: {
value: backendData.issues_growth.value,
isUp: backendData.issues_growth.is_up
value: backendData.monthly_issues_growth.value,
isUp: backendData.monthly_issues_growth.is_up
}
};
} catch (error) {