소스 검색

百度统计:统计交卷耗时

Michael Wang 5 년 전
부모
커밋
70ce30a4e5
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      src/features/OnlineExam/Examing/ExamingHome.vue

+ 9 - 0
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -635,6 +635,7 @@ export default {
       });
     },
     async realSubmitPaper(showConfirmTime = 0) {
+      this.__submitPaperStartTime = Date.now();
       this.$Spin.show({
         render: () => {
           return <div style="font-size: 44px">正在交卷,请耐心等待...</div>;
@@ -709,6 +710,14 @@ export default {
       }
       this.submitLock = false;
       this.$Spin.hide();
+      this.__submitPaperEndTime = Date.now();
+      window._hmt.push([
+        "_trackEvent",
+        "交卷耗时",
+        Math.floor(
+          (this.__submitPaperEndTime - this.__submitPaperStartTime) / 1000
+        ) + "秒",
+      ]);
     },
     examQuestion() {
       return (