@@ -152,6 +152,12 @@
showList:[],
};
},
+ watch:{
+ show(){
+ this.updateShowList()
+ }
+
+ },
components:{Media,ExamList,ICourseInfo,ICourseInfoTest,ICourseAnswerTest,ICourseInfoXsExtra},
beforeMount() {
console.log('beforeMount')
@@ -310,6 +310,9 @@
this.playNext()
playNext() {
+ if(this.tpl.courseCode.indexOf('-')==-1){
+ return;
let currentIndex = this.list.findIndex(i => i.id === this.media.id)
let nextItem = null
for (let i = currentIndex + 1; i < this.list.length; i++) {
@@ -424,6 +427,9 @@
}
Object.assign(this.media, res.data)
+ if( res.data.isFinish == 1){
+ this.playNext()
})
@@ -100,7 +100,7 @@ export function parseTime(time, cFormat) {
export function getPercent( item ){
- if( item.isFinish ) return 100;
+ if( item.isFinish == 1 ) return 100;
let percent = parseInt(item.position * 10000 / item.duration) / 100;
if( percent >= 100) return 99.99;
return percent