Browse Source

fix: 定时抓拍机制未启用

Michael Wang 3 years ago
parent
commit
93e70ff79c

+ 1 - 1
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -123,7 +123,7 @@ type CompareResult = { hasError: boolean; fileName: string };
 function onCompareResult({ hasError, fileName }: CompareResult) {
   if (hasError) {
     // 60秒后重试抓拍
-    addInterval(doSnap, 60 * 1000);
+    addTimeout(doSnap, 60 * 1000);
   } else {
     store.exam.compareResultMap.set(fileName, false);
     void showSnapResult(fileName, examRecordDataId);

+ 1 - 1
src/features/OnlineExam/Examing/setups/useFaceCompare.ts

@@ -85,7 +85,7 @@ export function useFaceCompare(): Ret {
           logger({
             cnl: ["server"],
             pgn: "答题页面",
-            dtl: "定时抓拍",
+            dtl: "定时抓拍设置interval",
             ext: { SNAPSHOT_INTERVAL: store.exam.SNAPSHOT_INTERVAL },
           });
           doSnap();

+ 1 - 1
src/features/OnlineExam/Examing/setups/useInitExamData.ts

@@ -78,7 +78,7 @@ export async function initExamData(examId: number, examRecordDataId: number) {
   }
 
   exam.freezeTime = JSON.parse("" + examProp.FREEZE_TIME);
-  examProp.SNAPSHOT_INTERVAL = JSON.parse("" + examProp.SNAPSHOT_INTERVAL);
+  exam.SNAPSHOT_INTERVAL = JSON.parse("" + examProp.SNAPSHOT_INTERVAL);
 
   exam.WEIXIN_ANSWER_ENABLED = weixinAnswerEnabled;