瀏覽代碼

黑板模式全屏音频

natasha 1 年之前
父節點
當前提交
05f612a5ed
共有 1 個文件被更改,包括 8 次插入5 次删除
  1. 8 5
      src/components/Adult/preview/Voicefullscreen.vue

+ 8 - 5
src/components/Adult/preview/Voicefullscreen.vue

@@ -708,9 +708,9 @@
         />
       </div>
     </template>
-    <div class="word-play-audio" v-if="isWordPlay">
+    <div class="word-play-audio" v-if="isWordPlay || isNewWordPlay">
       <AudioLineSentence
-        :mp3="NpcNewWordMp3"
+        :mp3="isWordPlay ? NpcNewWordMp3 : isNewWordPlay ? wordPlayMp3 : ''"
         :getCurTime="getCurWordTime"
         ref="audioLineWord"
         :audioId="'artPraAudioId' + curSentIndex + wordIndex"
@@ -814,6 +814,7 @@ export default {
       wordeds: 0,
       wordMaxTime: 0,
       isWordPlay: false,
+      isNewWordPlay: false,
       curWordTime: 0,
       isPlaying: false,
       isAuto: false,
@@ -1217,23 +1218,25 @@ export default {
       let _this = this;
       if (this.newWordList.indexOf(item.chs) > -1 || item.words) {
         _this.pauseAudio();
-        _this.isWordPlay = false;
+        _this.isNewWordPlay = false;
         let new_word = item.words ? item.words : item.chs;
         _this.NNPENewWordList.forEach(items => {
           items.forEach(itemn => {
             if (itemn.new_word === new_word) {
               _this.wordbg = itemn.bg;
               _this.worded = itemn.ed;
+              _this.wordPlayMp3 = itemn.newWordMp3;
             }
           });
         });
         setTimeout(() => {
-          _this.isWordPlay = true;
+          _this.isNewWordPlay = true;
         }, 50);
       }
     },
     changePlayStatus() {
       this.isWordPlay = false;
+      this.isNewWordPlay = false;
       this.wordIndex = -1;
     },
     showWordDetail(e, item) {
@@ -1264,7 +1267,7 @@ export default {
           if (itemn.new_word === new_word) {
             _this.wordbgs = itemn.bg;
             _this.wordeds = itemn.ed;
-            _this.wordPlayMp3 = _this.NpcNewWordMp3;
+            _this.wordPlayMp3 = itemn.newWordMp3;
           }
         });
       });