We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1aa422b commit 01c36d7Copy full SHA for 01c36d7
app/(root)/survey/[id]/page.tsx
@@ -94,15 +94,23 @@ export default function SurveyPage({ params }: { params: { id: number } }) {
94
return;
95
}
96
97
- await ScoreApi.finishAnswer(answerId);
+ try {
98
+ await ScoreApi.finishAnswer(answerId);
99
- notifications.show({
100
- title: '提交成功',
101
- message: '试卷已成功提交',
102
- color: 'green',
103
- });
+ notifications.show({
+ title: '提交成功',
+ message: '试卷已成功提交',
+ color: 'green',
104
+ });
105
- router.push(`/survey/${params.id}/completed?fs=true`);
106
+ router.push(`/survey/${params.id}/completed?fs=true`);
107
+ } catch (error) {
108
109
+ title: '提交失败',
110
+ message: '试卷提交时发生错误,请重试',
111
+ color: 'red',
112
113
+ }
114
115
116
function prevPage() {
0 commit comments