Просмотр исходного кода

优化课文播放句子时间为0

natasha 1 день назад
Родитель
Сommit
d2f7f43484

+ 1 - 1
src/views/book/courseware/preview/components/article/NormalModelChs.vue

@@ -2165,7 +2165,7 @@ export default {
     // 点击播放某个句子
     handleChangeTime(time, ed, index) {
       this.sentIndex = index;
-      if (time) {
+      if (time !== null && time !== undefined) {
         this.curTime = time;
         this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
         this.ed = ed;

+ 1 - 1
src/views/book/courseware/preview/components/article/Practicechs.vue

@@ -1081,7 +1081,7 @@ export default {
       }
       _this.sentIndex = index;
       _this.ed = ed;
-      if (time) {
+      if (time !== null && time !== undefined) {
         _this.curTime = time;
         _this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
       }

+ 1 - 1
src/views/book/courseware/preview/components/dialogue_article/Practicechs.vue

@@ -1233,7 +1233,7 @@ export default {
       }
       _this.sentIndex = index;
       _this.ed = ed;
-      if (time) {
+      if (time !== null && time !== undefined) {
         _this.curTime = time;
         _this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
       }