瀏覽代碼

完善抓拍日志

Michael Wang 5 年之前
父節點
當前提交
ecf1980aed

+ 4 - 0
src/components/FaceRecognition/FaceRecognition.vue

@@ -361,6 +361,10 @@ export default {
           (this.lastSnapTime ? "(非初次抓拍)" : "") + "将再次抓拍",
         ]);
         this.retrySnapTimeout = setTimeout(() => {
+          this.logger({
+            action: "答题页面",
+            detail: "定时抓拍流程失败后重试",
+          });
           this.toggleSnapNow();
         }, 60 * 1000);
       } finally {

+ 5 - 4
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -430,10 +430,6 @@ export default {
       if (faceCheckEnabled) {
         this.faceEnable = true;
 
-        // setTimeout(() => {
-        //   this.toggleSnapNow(); // 开启抓拍才在进入考试时抓拍一张
-        // }, 60 * 1000); // 60秒后抓拍
-
         let initSnapshotTrialTimes = 0;
         this.initSnapInterval = setInterval(() => {
           const video = document.getElementById("video");
@@ -493,6 +489,11 @@ export default {
           const SNAPSHOT_INTERVAL = JSON.parse(examProp.SNAPSHOT_INTERVAL);
           // 考务设置抓拍间隔
           this.snapInterval = setInterval(() => {
+            this.logger({
+              action: "答题页面",
+              detail: "定时抓拍",
+              SNAPSHOT_INTERVAL: examProp.SNAPSHOT_INTERVAL,
+            });
             this.toggleSnapNow();
           }, SNAPSHOT_INTERVAL * 60 * 1000);
         }