修复复盘保存 405:复盘改走成绩更新接口,并修正 API 404 回退。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-28 16:48:20 +08:00
parent bec9df5d6f
commit f7a761da33
4 changed files with 16 additions and 7 deletions
+5 -4
View File
@@ -64,13 +64,14 @@ export default function ExamReviewPanel({ exams, onRefresh }: Props) {
}
setSaving(true)
try {
await examApi.updateReview(
selectedExam.id,
selectedExam.scores.map((score) => ({
await examApi.update(selectedExam.id, {
scores: selectedExam.scores.map((score) => ({
subject_id: score.subject_id,
total_score: Number(score.total_score),
obtained_score: Number(score.obtained_score),
review_statuses: statusMap[score.subject_id] || [],
})),
)
})
message.success('复盘已保存')
onRefresh()
} catch (err) {