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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user