Przeglądaj źródła

问答录音bug

jwyu 2 lat temu
rodzic
commit
9795c852e4
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      pages-question/answerDetail.vue

+ 3 - 1
pages-question/answerDetail.vue

@@ -801,6 +801,7 @@ export default {
     //录音计时
     clockTime() {
       console.log("开始录音计时");
+      if(this.timer) return
       this.timer = setInterval(() => {
         if (this.timer) {
           this.audioCount += 30;
@@ -812,7 +813,8 @@ export default {
     //清除录音计时
     cleanTime() {
       console.log("结束录音计时");
-      clearTimeout(this.timer);
+      clearInterval(this.timer);
+      this.timer=null
       this.playIconKey++; //更新录音暂停播放图标
       //this.audioTime = this.dayjs(this.audioCount).format("mm:ss.SS");
     },