Browse Source

核心句

natasha 3 years ago
parent
commit
8e72271439
1 changed files with 10 additions and 2 deletions
  1. 10 2
      src/components/Adult/preview/SentenceListenRead.vue

+ 10 - 2
src/components/Adult/preview/SentenceListenRead.vue

@@ -12,6 +12,8 @@
         :mp3="curQue.mp3_list[0].url"
         :getCurTime="getCurTime"
         :themeColor="themeColor"
+        :ed="ed"
+        type="audioLine"
         ref="audioLine"
         @handleListenRead="handleListenRead"
       />
@@ -31,7 +33,7 @@
               ? 'active'
               : '',
           ]"
-          @click="handleChangeTime(curQue.wordTime[index].bg)"
+          @click="handleChangeTime(curQue.wordTime[index].bg,curQue.wordTime[index].ed)"
         ></a>
         <b v-if="items.number">{{ items.number }}</b>
         <div class="content-box">
@@ -125,6 +127,7 @@ export default {
       chsFhList: [",", "。", "“", ":", "》", "《", "?", "!", ";"],
       noFont: ["~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")"], // 对应不要拼音字体
       stopAudio: false,
+      ed:null,
     };
   },
   computed: {},
@@ -178,14 +181,19 @@ export default {
     },
     handleWav(data) {},
     //点击播放某个句子
-    handleChangeTime(time) {
+    handleChangeTime(time,edTime) {
       let _this = this;
       _this.curTime = time;
+      _this.stopAudio = true
       _this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
+      _this.ed = edTime
     },
     handleListenRead(playFlag) {
       this.stopAudio = playFlag;
     },
+    emptyEd(){
+        this.ed = null;
+    }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {