Michael Wang 5 年 前
コミット
a3998c66a1
1 ファイル変更2 行追加1 行削除
  1. 2 1
      src/features/OnlineExam/CheckComputer.vue

+ 2 - 1
src/features/OnlineExam/CheckComputer.vue

@@ -790,7 +790,7 @@ export default {
     }, 1000);
     openWS({ examRecordDataId: this.$store.state.user.id });
     if (!getQRCode(1, "AUDIO", { testEnv: true })) {
-      setTimeout(() => {
+      this.getQRCodeTimeout = setTimeout(() => {
         getQRCode(1, "AUDIO", { testEnv: true });
       }, 3000);
     }
@@ -824,6 +824,7 @@ export default {
   beforeDestroy() {
     clearInterval(this.getNowInterval);
     clearTimeout(this.checkClockRateTimeout);
+    clearTimeout(this.getQRCodeTimeout);
     if (this.$refs.video.srcObject) {
       this.$refs.video.srcObject.getTracks().forEach(function(track) {
         track.stop();