浏览代码

fix logger object

Michael Wang 5 年之前
父节点
当前提交
24de5ca032

+ 1 - 1
src/components/FaceRecognition/FaceRecognition.vue

@@ -352,7 +352,7 @@ export default {
         console.log("定时抓拍流程失败", error);
         this.logger({
           action: "定时抓拍流程失败",
-          detail: error,
+          detail: JSON.stringify(error),
         });
         window._hmt.push([
           "_trackEvent",

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

@@ -752,7 +752,10 @@ export default {
           return true;
         } catch (error) {
           console.log(error);
-          this.logger({ action: "提交答案失败", detail: error });
+          this.logger({
+            action: "提交答案失败",
+            detail: JSON.stringify(error),
+          });
           this.$Message.error({
             content: "提交答案失败",
             duration: 15,
@@ -903,7 +906,7 @@ export default {
           closable: true,
         });
         console.log(e);
-        this.logger({ action: "交卷失败", detail: e });
+        this.logger({ action: "交卷失败", detail: JSON.stringify(e) });
       }
       this.submitLock = false;
       this.$Spin.hide();

+ 2 - 1
src/features/OnlineExam/Examing/RemainTime.vue

@@ -118,7 +118,8 @@ export default {
           this.logger({
             action: "发出心跳",
             error: "心跳失败",
-            detail: `考试剩余时间:${this.remainTime / 1000} => ${error}`,
+            detail1: `考试剩余时间:${this.remainTime / 1000}`,
+            detail2: JSON.stringify(error),
           });
           this.serverLog(
             "debug/S-008003",