From c67fcaf48c1c0d6997933144b54f97170473491c Mon Sep 17 00:00:00 2001 From: zhangsir Date: Fri, 5 Jul 2024 13:16:19 +0800 Subject: [PATCH] bug --- src/views/study/coursenew.vue | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index 2efad485..7665c229 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -1109,11 +1109,11 @@ onPlayerPlay() { //console.log("开始播放"); - if(this.contentData.contentType == 10){ - if(this.contentData.status<2){ - this.contentData.status = 2; - } - } + // if(this.contentData.contentType == 10){ + // if(this.contentData.status<2){ + // this.contentData.status = 2; + // } + // } this.playerBoxShow = false; let $this = this; //这里有些不准备,如果文件未能加载,这个事件就是错误的 @@ -1216,6 +1216,7 @@ audioPlaying(item, currentTime) { //console.log("当前播放"+item); let intTime = parseInt(currentTime); + this.handleAudioTimeUpdate(intTime) //判断是否完成 let completeType = this.curriculumData.completeSetup; let completeSecond = this.curriculumData.second; @@ -1255,9 +1256,9 @@ }, audioPlay() { //console.log("开始播放"); - if(this.contentData.contentType == 20 && this.contentData.status < 2){ - this.contentData.status = 2; - } + // if(this.contentData.contentType == 20 && this.contentData.status < 2){ + // this.contentData.status = 2; + // } let $this = this; this.isAppendTime=true; this.appendStudyTime();//启动追加学习时长 @@ -1453,9 +1454,11 @@ }); }, saveStudyInfo() { - if(this.isContentType != this.contentData.contentType){ - //定时器产生的,不记录 - return + if(this.isContentType){ + if(this.isContentType != this.contentData.contentType){ + //定时器产生的,不记录 + return + } } //记录课件学习信息 if (this.contentData.contentType >= 60) { @@ -1713,8 +1716,12 @@ status: 2, contentTotal: this.totalContent }; - if(currentTime > 2 && this.trueFalse && this.contentData.contentType == 10){ - apiStudy.studyContent(params) + if(currentTime > 2 && this.trueFalse){ + apiStudy.studyContent(params).then(()=>{ + if(this.contentData.status<2){ + this.contentData.status = 2; + } + }) this.trueFalse = false } // }