修改视频记录时间问题

This commit is contained in:
zhangsir
2024-08-01 10:59:09 +08:00
parent 345bda9e15
commit be3c023d6c

View File

@@ -1558,7 +1558,14 @@
status: 2, status: 2,
contentTotal:this.totalContent contentTotal:this.totalContent
} }
apiCourseStudy.studyContent(params) apiCourseStudy.studyContent(params).then(res=>{
if(res.status == 200) {
this.curContent.status=2;//完成
this.curContent.studyItemId=res.result;//学习记录id
}else{
console.log('记录学习失败:'+res.message+''+res.error);
}
})
this.trueFalse = false this.trueFalse = false
} }
//console.log("当前播放11",itme); //console.log("当前播放11",itme);
@@ -1570,10 +1577,10 @@
//判断是否完成 //判断是否完成
let completeType=this.curriculumData.completeSetup; let completeType=this.curriculumData.completeSetup;
let completeSecond=this.curriculumData.second; let completeSecond=this.curriculumData.second;
if(!completeSecond){ if (!completeSecond || completeType == 0) {
completeSecond = 5; //如果没有就采用默认的时间了 completeSecond = 5; //如果没有就采用默认的时间了
} }
if(completeType>0 && this.curContent.status<9){ //因为1按进度2按时长都是计算时间所以这里直接大于0处理 if (this.curContent.status < 9) { //因为1按进度2按时长都是计算时间所以这里直接大于0处理
if (completeType == 1) { if (completeType == 1) {
let finishPercent=this.curriculumData.setupTage; let finishPercent=this.curriculumData.setupTage;
let videDuration=this.curContent.duration; let videDuration=this.curContent.duration;
@@ -1587,6 +1594,7 @@
} }
} }
} }
} }
//以下是每隔10秒存储一下进度 //以下是每隔10秒存储一下进度
let saveTime=Math.floor(intTime%10); let saveTime=Math.floor(intTime%10);