Explorar el Código

补充SLS日志

Michael Wang hace 5 años
padre
commit
b23125b372

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

@@ -225,7 +225,7 @@ export default {
       this.ws = new WebSocket(
         `${VUE_APP_WK_SERVER_SOCKET}?key=${this.$store.state.user.key}&token=${this.$store.state.user.token}`
       );
-      this.ws.onopen = function() {
+      this.ws.onopen = () => {
         window._hmt.push([
           "_trackEvent",
           "活体检测弹出框",
@@ -263,7 +263,7 @@ export default {
       };
 
       // 重复关闭不会报错
-      this.ws.onclose = function() {
+      this.ws.onclose = () => {
         console.log("websocket连接已关闭...");
         window._hmt.push([
           "_trackEvent",

+ 8 - 2
src/features/OnlineExam/OnlineExamHome.vue

@@ -134,8 +134,14 @@ export default {
     });
   },
   async mounted() {
-    window._hmt.push(["_trackEvent", "在线考试列表页面", "进入页面"]);
-    this.logger({ page: "在线考试列表页面", action: "进入页面" });
+    let page;
+    if (this.examType === "ONLINE") {
+      page = "在线考试列表页面";
+    } else if (this.examType === "ONLINE_HOMEWORK") {
+      page = "在线练习列表页面";
+    }
+    window._hmt.push(["_trackEvent", page, "进入页面"]);
+    this.logger({ page, action: "进入页面" });
 
     await this.getData();
   },