mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-10 11:26:47 +08:00
提交合并后的所有文件
This commit is contained in:
@@ -746,52 +746,51 @@
|
||||
},
|
||||
onPlayerPlaying(e){
|
||||
//console.log("当前播放11",itme);
|
||||
this.isAppendTime=false;//禁止追加学习时间
|
||||
//console.log("当前播放11"+itme);
|
||||
let intTime=parseInt(e.detail.currentTime);
|
||||
if(intTime>this.videoPlayingTime){
|
||||
this.videoPlayingTime=intTime;
|
||||
this.isAppendTime=false;//禁止追加学习时间
|
||||
//console.log("当前播放11"+itme);
|
||||
let intTime=parseInt(e.detail.currentTime);
|
||||
if(intTime>this.videoPlayingTime){
|
||||
this.videoPlayingTime=intTime;
|
||||
|
||||
//判断是否完成
|
||||
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();
|
||||
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(completeType==2){
|
||||
if(intTime>=completeSecond){
|
||||
this.finishStudyItem();
|
||||
}
|
||||
}
|
||||
}else if(completeType==2){
|
||||
if(intTime>=completeSecond){
|
||||
this.finishStudyItem();
|
||||
}
|
||||
}
|
||||
//以下是每隔10秒存储一下进度
|
||||
let saveTime=Math.floor(intTime%10);
|
||||
//console.log(intTime,saveTime,'aa',this.curContent.studyItemId)
|
||||
if(this.preTime!=intTime && saveTime==0 && this.curContent.studyItemId!=''){
|
||||
this.preTime=intTime;
|
||||
this.curContent.lastStudyTime=intTime;
|
||||
//记录播放时间
|
||||
//console.log('记录播放时间:'+intTime);
|
||||
let postData={
|
||||
itemId:this.curContent.studyItemId,
|
||||
videoTime:intTime
|
||||
}
|
||||
apiCourseStudy.studyVideoTime(postData).then(rs=>{
|
||||
if(rs.status!=200){
|
||||
console.log('记录播放时间错误');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//以下是每隔10秒存储一下进度
|
||||
let saveTime=Math.floor(intTime%10);
|
||||
//console.log(intTime,saveTime,'aa',this.curContent.studyItemId)
|
||||
if(this.preTime!=intTime && saveTime==0 && this.curContent.studyItemId!=''){
|
||||
this.preTime=intTime;
|
||||
this.curContent.lastStudyTime=intTime;
|
||||
//记录播放时间
|
||||
//console.log('记录播放时间:'+intTime);
|
||||
let postData={
|
||||
itemId:this.curContent.studyItemId,
|
||||
videoTime:intTime
|
||||
}
|
||||
apiCourseStudy.studyVideoTime(postData).then(rs=>{
|
||||
if(rs.status!=200){
|
||||
console.log('记录播放时间错误');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
audioPlay(){
|
||||
this.isAppendTime=false;
|
||||
@@ -1026,7 +1025,7 @@
|
||||
},
|
||||
playContent(cata,con,conIndex,catIndex){
|
||||
|
||||
if(conIndex!=undefined && catIndex!=undefined) {
|
||||
if(conIndex && catIndex) {
|
||||
if(this.courseInfo.orderStudy) {
|
||||
let hasIndex=-1;
|
||||
this.scrollList.some((one,idx)=>{
|
||||
|
||||
Reference in New Issue
Block a user