mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-06 09:26:45 +08:00
修改视频记录时间问题
This commit is contained in:
@@ -1558,7 +1558,14 @@
|
||||
status: 2,
|
||||
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
|
||||
}
|
||||
//console.log("当前播放11",itme);
|
||||
@@ -1570,23 +1577,24 @@
|
||||
//判断是否完成
|
||||
let completeType=this.curriculumData.completeSetup;
|
||||
let completeSecond=this.curriculumData.second;
|
||||
if(!completeSecond){
|
||||
completeSecond=5;//如果没有就采用默认的时间了
|
||||
}
|
||||
if(completeType>0 && this.curContent.status<9){ //因为1按进度,2按时长都是计算时间,所以这里直接大于0处理
|
||||
if(completeType==1){
|
||||
let finishPercent=this.curriculumData.setupTage;
|
||||
let videDuration=this.curContent.duration;
|
||||
let percent =intTime*100/videDuration;
|
||||
if(percent>=finishPercent){
|
||||
this.finishStudyItem();
|
||||
}
|
||||
}else{
|
||||
if(intTime>=completeSecond){
|
||||
this.finishStudyItem();
|
||||
}
|
||||
if (!completeSecond || completeType == 0) {
|
||||
completeSecond = 5; //如果没有就采用默认的时间了
|
||||
}
|
||||
if (this.curContent.status < 9) { //因为1按进度,2按时长都是计算时间,所以这里直接大于0处理
|
||||
if (completeType == 1) {
|
||||
let finishPercent=this.curriculumData.setupTage;
|
||||
let videDuration=this.curContent.duration;
|
||||
let percent =intTime*100/videDuration;
|
||||
if (percent >= finishPercent) {
|
||||
this.finishStudyItem();
|
||||
}
|
||||
} else {
|
||||
if (intTime >= completeSecond) {
|
||||
this.finishStudyItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//以下是每隔10秒存储一下进度
|
||||
let saveTime=Math.floor(intTime%10);
|
||||
|
||||
Reference in New Issue
Block a user