Forráskód Böngészése

减少日志记录

Michael Wang 5 éve
szülő
commit
bb79c3ab4f

+ 5 - 2
src/components/FaceRecognition/FaceRecognition.vue

@@ -150,7 +150,9 @@ export default {
                 "_trackEvent",
                 "摄像头框",
                 "摄像头打开耗时",
-                Math.floor((_openEndTime - _openStartTime) / 1000) + "秒",
+                Number(
+                  Math.floor((_openEndTime - _openStartTime) / 1000)
+                ).toPrecision(1) + "秒",
               ]);
               console.log(
                 "摄像头打开耗时",
@@ -223,8 +225,9 @@ export default {
         const captureBlob = await this.getSnapShot({ compareSync: false });
         this.videoStartPlay();
         console.log("抓拍照片的大小:" + captureBlob.size);
-        if (captureBlob.size < 10 * 1024) {
+        if (captureBlob.size < 48 * 48) {
           // 经查以前记录,不完整图片均为8192大小。此处设置小于10KB的图片为未抓拍成功
+          // 检查百度统计的记录后,这里的图片大小可能小于8192,也可能是有效的数据,所以降低图片大小的要求为face++的要求
           window._hmt.push([
             "_trackEvent",
             "摄像头框",

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

@@ -815,9 +815,9 @@ export default {
           window._hmt.push([
             "_trackEvent",
             "交卷耗时",
-            Math.floor(
+            Number(
               (this.__submitPaperEndTime - this.__submitPaperStartTime) / 1000
-            ) + "秒",
+            ).toPrecision(1) + "秒",
           ]);
           return;
         } else {