Browse Source

更新扫码参与训练的链接

yourname 6 months ago
parent
commit
3034b6a879
1 changed files with 5 additions and 2 deletions
  1. 5 2
      client/mobile/components/Exam/ExamAdmin.tsx

+ 5 - 2
client/mobile/components/Exam/ExamAdmin.tsx

@@ -62,7 +62,7 @@ function QRCodeSection({ classroom }: { classroom: string }) {
     <div className="text-center">
       <div className="text-gray-600 mb-2">扫码参与训练</div>
       <div className="inline-block p-4 bg-white rounded-lg shadow-md">
-        <QRCode value={`${globalThis.location.origin}/exam?classroom=${classroom}`} />
+        <QRCode value={`${globalThis.location.origin}/mobile/exam/card?classroom=${classroom}`} />
       </div>
     </div>
   );
@@ -147,9 +147,12 @@ export default function ExamAdmin() {
     if (!classroom || answers.length === 0) return;
 
     try {
-      await answerManagement.cleanupRoom(classroom, currentDate);
+      await answerManagement.cleanupRoom(classroom);
       message.success('答案提交成功');
       setAnswers([]);
+      setDailyAnswers({});
+      setCurrentDate('');
+      setCurrentPrice('0');
     } catch (error: any) {
       console.error('提交答案失败:', error);
       message.error(error?.message || '提交答案失败');