refactor(errors): migrate decisions to {code,msg}

This commit is contained in:
zetaloop
2026-02-28 07:21:51 +08:00
parent 4e2ee5be54
commit cc24a0cbc3
23 changed files with 157 additions and 165 deletions
+3 -3
View File
@@ -112,7 +112,7 @@ export default function DisputePage({ params }: { params: Promise<{ id: string }
evidence: files,
})
if (!result.decision.ok) {
notifyInfo(result.decision.message ?? "提交争议失败")
notifyInfo(result.decision.error.msg)
return
}
router.replace(`/dispute/${id}?submitted=1`)
@@ -288,7 +288,7 @@ export default function DisputePage({ params }: { params: Promise<{ id: string }
evidence: responseFiles,
})
if (!decision.ok) {
notifyInfo(decision.message ?? "提交回应失败")
notifyInfo(decision.error.msg)
}
}}
disabled={!responseReason.trim()}
@@ -336,7 +336,7 @@ export default function DisputePage({ params }: { params: Promise<{ id: string }
reason: appealReason,
})
if (!decision.ok) {
notifyInfo(decision.message ?? "提交申诉失败")
notifyInfo(decision.error.msg)
}
}}
disabled={!appealReason.trim()}