diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index 34b0d865..2efad485 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -369,6 +369,8 @@ }, data() { return { + isContentTypeTwo: null, + isContentType: null, activeId: '', isFalse: false, defaultOpeneds: [], @@ -749,9 +751,10 @@ } if (this.contentData.status < 2) { // this.contentData.status = 2; //进行中 - if(r.contentType != 61&&r.contentType != 20 && r.contentType != 10){ - setTimeout(() => { - this.contentData.status = 2; + if(r.contentType != 61&&r.contentType != 20 && r.contentType != 10){ + setTimeout(() => { + this.isContentTypeTwo = r.contentType + $this.isShowTime() }, 2000); } } @@ -782,6 +785,7 @@ $this.appendStudyOtherTime(); }, 15000); //非音视频课程学习,十五秒后记录 //this.appendStudyTime(); + this.isContentType = this.contentData.contentType if (this.contentData.contentType != 50) { this.handleTimeout = setTimeout(function(){ $this.saveStudyInfo(); @@ -810,6 +814,12 @@ //console.log(h,$this.controlHeight,'$this.controlHeight'); }) }, + isShowTime(){ + if(this.isContentTypeTwo != this.contentData.contentType){ + return + } + this.contentData.status = 2; + }, showRes(r, i, index,item) { //i:子节下标,index:章下标 // 无权限查看不能点击 if(!this.isCrowd){ @@ -1443,6 +1453,10 @@ }); }, saveStudyInfo() { + if(this.isContentType != this.contentData.contentType){ + //定时器产生的,不记录 + return + } //记录课件学习信息 if (this.contentData.contentType >= 60) { //只有在课件页面停留超过5秒才会记录