Procházet zdrojové kódy

百度统计:统计交卷耗时

Michael Wang před 5 roky
rodič
revize
70ce30a4e5
1 změnil soubory, kde provedl 9 přidání a 0 odebrání
  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 (