|
@@ -303,6 +303,9 @@ export default {
|
|
|
created() {
|
|
|
this.fetchQRCode();
|
|
|
},
|
|
|
+ beforeDestroy() {
|
|
|
+ clearTimeout(this.fetchQRCodeTimeout);
|
|
|
+ },
|
|
|
methods: {
|
|
|
...mapMutations(["updateExamQuestion"]),
|
|
|
...mapGetters(["examShouldShowAnswer"]),
|
|
@@ -377,7 +380,8 @@ export default {
|
|
|
const transferFileType =
|
|
|
this.examQuestion.answerType === "SINGLE_AUDIO" ? "AUDIO" : "PIC";
|
|
|
if (!getQRCode(this.examQuestion.order, transferFileType)) {
|
|
|
- setTimeout(() => {
|
|
|
+ clearTimeout(this.fetchQRCodeTimeout);
|
|
|
+ this.fetchQRCodeTimeout = setTimeout(() => {
|
|
|
this.fetchQRCode();
|
|
|
}, 3000);
|
|
|
}
|