y595705120 2 minggu lalu
induk
melakukan
62a014a88b

+ 6 - 0
src/containers/center/play/index.vue

@@ -152,6 +152,12 @@
         showList:[],
         showList:[],
       };
       };
     },
     },
+    watch:{
+      show(){
+        this.updateShowList()
+      }
+
+    },
     components:{Media,ExamList,ICourseInfo,ICourseInfoTest,ICourseAnswerTest,ICourseInfoXsExtra},
     components:{Media,ExamList,ICourseInfo,ICourseInfoTest,ICourseAnswerTest,ICourseInfoXsExtra},
     beforeMount() {
     beforeMount() {
       console.log('beforeMount')
       console.log('beforeMount')

+ 6 - 0
src/containers/center/play/play.vue

@@ -310,6 +310,9 @@
         this.playNext()
         this.playNext()
       },
       },
       playNext() {
       playNext() {
+        if(this.tpl.courseCode.indexOf('-')==-1){
+          return;
+        }
         let currentIndex = this.list.findIndex(i => i.id === this.media.id)
         let currentIndex = this.list.findIndex(i => i.id === this.media.id)
         let nextItem = null
         let nextItem = null
         for (let i = currentIndex + 1; i < this.list.length; i++) {
         for (let i = currentIndex + 1; i < this.list.length; i++) {
@@ -424,6 +427,9 @@
               }
               }
             }
             }
             Object.assign(this.media, res.data)
             Object.assign(this.media, res.data)
+            if( res.data.isFinish == 1){
+              this.playNext()
+            }
           }
           }
         })
         })
       },
       },

+ 1 - 1
src/utils/index.js

@@ -100,7 +100,7 @@ export function parseTime(time, cFormat) {
 
 
 
 
 export function getPercent( item ){
 export function getPercent( item ){
-  if( item.isFinish ) return  100;
+  if( item.isFinish == 1 ) return  100;
   let percent = parseInt(item.position * 10000 / item.duration) / 100;
   let percent = parseInt(item.position * 10000 / item.duration) / 100;
   if( percent >= 100) return 99.99;
   if( percent >= 100) return 99.99;
   return percent
   return percent