Pārlūkot izejas kodu

兼容生词播放开始时间

natasha 1 gadu atpakaļ
vecāks
revīzija
6d0395b7d2

+ 8 - 3
src/components/Adult/Preview.vue

@@ -1381,13 +1381,18 @@ export default {
                 // }
                 // }
               }
               }
               if (itemss.data && itemss.data.type == "NewWord_chs") {
               if (itemss.data && itemss.data.type == "NewWord_chs") {
-                _this.NNPENewWordList = _this.NNPENewWordList.concat(
-                  itemss.data.option
-                );
                 _this.NpcNewWordMp3 =
                 _this.NpcNewWordMp3 =
                   itemss.data && itemss.data.mp3_list && itemss.data.mp3_list[0]
                   itemss.data && itemss.data.mp3_list && itemss.data.mp3_list[0]
                     ? itemss.data.mp3_list[0].id
                     ? itemss.data.mp3_list[0].id
                     : "";
                     : "";
+                itemss.data.option.forEach(itemso => {
+                  itemso.forEach(itemsos => {
+                    itemsos.newWordMp3 = _this.NpcNewWordMp3;
+                  });
+                });
+                _this.NNPENewWordList = _this.NNPENewWordList.concat(
+                  itemss.data.option
+                );
               } else if (itemss.data && itemss.data.type == "notes_chs") {
               } else if (itemss.data && itemss.data.type == "notes_chs") {
                 _this.NNPEAnnotationList = _this.NNPEAnnotationList.concat(
                 _this.NNPEAnnotationList = _this.NNPEAnnotationList.concat(
                   itemss.data.option
                   itemss.data.option

+ 13 - 1
src/components/Adult/preview/ArticleViewChs/PhraseModelChs.vue

@@ -688,6 +688,9 @@
           :TaskModel="TaskModel"
           :TaskModel="TaskModel"
           :writeList="curQue.Bookanswer.writeModel"
           :writeList="curQue.Bookanswer.writeModel"
           @changeCurQue="changeCurQue"
           @changeCurQue="changeCurQue"
+          :mp3Url="activeWord ? activeWord.newWordMp3 : ''"
+          :bg="activeWord ? activeWord.bg : null"
+          :ed="activeWord ? activeWord.ed : null"
         />
         />
       </div>
       </div>
     </template>
     </template>
@@ -778,7 +781,8 @@ export default {
       sentIndex: -1,
       sentIndex: -1,
       highWords: null,
       highWords: null,
       highWordsArr: [],
       highWordsArr: [],
-      highIndex: 0
+      highIndex: 0,
+      activeWord: null
     };
     };
   },
   },
   computed: {},
   computed: {},
@@ -1216,6 +1220,7 @@ export default {
     viewNotes(e, noteNum) {
     viewNotes(e, noteNum) {
       let _this = this;
       let _this = this;
       _this.clickType = "note";
       _this.clickType = "note";
+      _this.activeWord = null;
       let noteIndex = "";
       let noteIndex = "";
       if (_this.NumberList.indexOf(noteNum) > -1) {
       if (_this.NumberList.indexOf(noteNum) > -1) {
         for (let i = 0; i < _this.NumberList.length; i++) {
         for (let i = 0; i < _this.NumberList.length; i++) {
@@ -1229,6 +1234,13 @@ export default {
         if (this.newWordList.indexOf(noteNum) > -1) {
         if (this.newWordList.indexOf(noteNum) > -1) {
           if (_this.oldHz != noteNum) {
           if (_this.oldHz != noteNum) {
             this.isShow = false;
             this.isShow = false;
+            _this.NNPENewWordList.forEach(item => {
+              item.forEach(items => {
+                if (items.new_word === noteNum) {
+                  this.activeWord = items;
+                }
+              });
+            });
             setTimeout(() => {
             setTimeout(() => {
               _this.hz = noteNum;
               _this.hz = noteNum;
             }, 50);
             }, 50);

+ 1 - 0
src/components/Adult/preview/ArticleViewChs/index.vue

@@ -625,6 +625,7 @@ export default {
     align-items: center;
     align-items: center;
     margin-bottom: 16px;
     margin-bottom: 16px;
     position: relative;
     position: relative;
+    height: 24px;
     .left {
     .left {
       display: flex;
       display: flex;
       align-items: center;
       align-items: center;

+ 1 - 0
src/components/Adult/preview/DialogueArticleViewChs/index.vue

@@ -669,6 +669,7 @@ export default {
     align-items: center;
     align-items: center;
     margin-bottom: 16px;
     margin-bottom: 16px;
     position: relative;
     position: relative;
+    height: 24px;
     .left {
     .left {
       display: flex;
       display: flex;
       align-items: center;
       align-items: center;

+ 2 - 0
src/components/Adult/preview/WordPhrase.vue

@@ -300,6 +300,8 @@
         :optionRes="optionRes"
         :optionRes="optionRes"
         :themeColor="themeColor"
         :themeColor="themeColor"
         :currentTreeID="currentTreeID"
         :currentTreeID="currentTreeID"
+        :bg="data && data.bg ? data.bg : null"
+        :ed="data && data.ed ? data.ed : null"
         type="newWordDetail"
         type="newWordDetail"
       />
       />
     </div>
     </div>

+ 11 - 1
src/components/Adult/preview/components/WordPhraseDetail.vue

@@ -88,8 +88,18 @@
           <div class="wordInfor">
           <div class="wordInfor">
             <div class="yinpin">
             <div class="yinpin">
               <span class="pinyintext"> {{ data.pinyin.toLowerCase() }}</span>
               <span class="pinyintext"> {{ data.pinyin.toLowerCase() }}</span>
+              <template v-if="data.newWordMp3">
+                <Audio
+                  :mp3="data.newWordMp3"
+                  :themeColor="themeColor"
+                  :bg="bg"
+                  :ed="ed"
+                />
+              </template>
               <template
               <template
-                v-if="data.mp3_list && data.mp3_list[0] && data.mp3_list[0].id"
+                v-else-if="
+                  data.mp3_list && data.mp3_list[0] && data.mp3_list[0].id
+                "
               >
               >
                 <Audio :mp3="data.mp3_list[0].id" :themeColor="themeColor" />
                 <Audio :mp3="data.mp3_list[0].id" :themeColor="themeColor" />
               </template>
               </template>