Sfoglia il codice sorgente

第一道题是音频题,等待ws连接成功再获取QRcode

Michael Wang 6 anni fa
parent
commit
8328721c7a
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5 1
      src/features/OnlineExam/Examing/TextQuestionView.vue

+ 5 - 1
src/features/OnlineExam/Examing/TextQuestionView.vue

@@ -230,7 +230,11 @@ export default {
     },
     fetchQRCode() {
       if (this.examQuestion.answerType === "SINGLE_AUDIO") {
-        getQRCode(this.examQuestion.order);
+        if (!getQRCode(this.examQuestion.order)) {
+          setTimeout(() => {
+            this.fetchQRCode();
+          }, 3000);
+        }
       }
     },
     photoAdded(url) {