浏览代码

语音全屏-bug修改

guanchunjie 3 年之前
父节点
当前提交
dfe869ba54
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      src/components/Adult/preview/AudioLineSentence.vue

+ 5 - 2
src/components/Adult/preview/AudioLineSentence.vue

@@ -102,6 +102,7 @@ export default {
       duioCurrentTime: null, // 剩余时间
       count: 0,
       loading: null,
+      playcount: 0,
     };
   },
   // 计算属性 类似于data概念
@@ -216,12 +217,13 @@ export default {
       } else {
         if (this.count == 0) {
           this.audio.loading = true;
+          this.count++;
         }
 
         this.$refs[audioId].play();
-        if (this.count == 0) {
+        if (this.playcount == 0) {
           this.onTimeupdateTime(this.bg / 1000);
-          this.count++;
+          this.playcount++;
         }
 
         this.$emit("handleChangeStopAudio");
@@ -274,6 +276,7 @@ export default {
         if (_this.audio.currentTime * 1000 > _this.ed) {
           if (_this.$refs[audioId]) {
             _this.$refs[audioId].pause();
+            _this.playcount = 0;
           }
         }
       }, 50);