gcj 3 лет назад
Родитель
Сommit
ac13c334da
1 измененных файлов с 10 добавлено и 20 удалено
  1. 10 20
      src/views/adultInput.vue

+ 10 - 20
src/views/adultInput.vue

@@ -1483,7 +1483,6 @@ export default {
                 sentence_list_mp = sentence_list_mp.concat(obj.res); // 句子+分词数组
                 sentence_list_mp = sentence_list_mp.concat(obj.res); // 句子+分词数组
               });
               });
             } else if (topicIitem.type == "NewWord_chs") {
             } else if (topicIitem.type == "NewWord_chs") {
-              console.log(topicIitem);
               let audio_file_id = "";
               let audio_file_id = "";
               audio_file_id =
               audio_file_id =
                 topicIitem.data.mp3_list && topicIitem.data.mp3_list.length > 0
                 topicIitem.data.mp3_list && topicIitem.data.mp3_list.length > 0
@@ -1495,25 +1494,16 @@ export default {
               topicIitem.data.option.forEach((item) => {
               topicIitem.data.option.forEach((item) => {
                 item.map((sItem) => {
                 item.map((sItem) => {
                   sItem.audio_file_id = audio_file_id;
                   sItem.audio_file_id = audio_file_id;
-                  if (sItem.mp3_list && sItem.mp3_list.length > 0) {
-                    sItem.audio_file_id = sItem.mp3_list[0].id
-                      .replace("[FID##", "")
-                      .replace("##FID]", "");
-                    sItem.audio_begin_time = 0;
-                    sItem.audio_end_time = 0;
-                  } else {
-                    sItem.audio_begin_time =
-                      topicIitem.data.wordTime &&
-                      topicIitem.data.wordTime[index]
-                        ? topicIitem.data.wordTime[index].bg
-                        : 0;
-                    sItem.audio_end_time =
-                      topicIitem.data.wordTime &&
-                      topicIitem.data.wordTime[index]
-                        ? topicIitem.data.wordTime[index].bg
-                        : 0;
-                  }
-
+                  sItem.audio_begin_time =
+                    topicIitem.data.wordTime &&
+                    topicIitem.data.wordTime[sItem.sIndex]
+                      ? Number(topicIitem.data.wordTime[sItem.sIndex].bg)
+                      : 0;
+                  sItem.audio_end_time =
+                    topicIitem.data.wordTime &&
+                    topicIitem.data.wordTime[sItem.sIndex]
+                      ? Number(topicIitem.data.wordTime[sItem.sIndex].ed)
+                      : 0;
                   return sItem;
                   return sItem;
                 });
                 });