|
@@ -478,7 +478,7 @@
|
|
|
// 当开始/继续播放时触发play事件
|
|
|
getPlay() {
|
|
|
this.errorCount = 0
|
|
|
- // this.judgeDuration()
|
|
|
+ this.judgeDuration()
|
|
|
},
|
|
|
getPause() {
|
|
|
this.clearIntegral()
|
|
@@ -587,7 +587,6 @@
|
|
|
this.isFinish = res.isFinish || 0
|
|
|
this.duration = res.course && res.course.duration ? res.course.duration : 0
|
|
|
this.playDuration = res.playDuration || 0
|
|
|
- this.playDurationSeek = res.playDuration || 0
|
|
|
this.tipsTime = res.tipsTime || 0
|
|
|
let lineList = []
|
|
|
if (res.course && res.course.lineOne) {
|
|
@@ -610,6 +609,7 @@
|
|
|
// this.options.poster = res.course && res.course.imgUrl ? res.course.imgUrl : ''
|
|
|
// this.initVideo()
|
|
|
this.playTime = this.playDuration >= this.duration ? 0 : this.playDuration
|
|
|
+ this.playDurationSeek =this.playTime
|
|
|
setTimeout(()=>{
|
|
|
this.player = uni.createVideoContext('video-content-box');
|
|
|
this.player.seek(this.playTime)
|
|
@@ -625,6 +625,7 @@
|
|
|
// }
|
|
|
// }
|
|
|
this.playTime = this.playTime > this.playDuration ? this.playTime : this.playDuration >= this.duration ? 0 : this.playDuration
|
|
|
+ this.playDurationSeek =this.playTime
|
|
|
this.player.seek(this.playTime)
|
|
|
this.player.play();
|
|
|
}
|
|
@@ -767,8 +768,8 @@
|
|
|
// 答题成功
|
|
|
this.errTitle = "恭喜你,回答正确"
|
|
|
this.errDesc = `请选择奖励`
|
|
|
- // this.$refs.answerPopup.open("center")
|
|
|
- this.closeAnswerPopup(1)
|
|
|
+ this.$refs.answerPopup.open("center")
|
|
|
+ // this.closeAnswerPopup(1)
|
|
|
}
|
|
|
} else {
|
|
|
if (res.msg == "该课题到达答错次数限制") {
|
|
@@ -918,7 +919,7 @@
|
|
|
this.$refs.kfPopup.close()
|
|
|
},
|
|
|
getFinishCourseVideo() {
|
|
|
- if (!this.playTime) return
|
|
|
+ if (!this.playTime||!this.isLogin||this.isAddKf!=1) return
|
|
|
// {videoId: this.videoId,duration:this.playTime}
|
|
|
const param = {
|
|
|
duration: this.playTime,
|
|
@@ -928,6 +929,7 @@
|
|
|
},
|
|
|
// 每十分钟获得积分
|
|
|
getIntegralByH5Video() {
|
|
|
+ if(!this.isLogin||this.isAddKf!=1) return
|
|
|
const param = {
|
|
|
duration: this.playTime,
|
|
|
...this.urlOption
|
|
@@ -946,17 +948,19 @@
|
|
|
},
|
|
|
// 缓冲
|
|
|
getInternetTraffic() {
|
|
|
+ if(!this.isLogin||this.isAddKf!=1) return
|
|
|
const playVideoTime = Math.ceil(this.playTime / this.duration * 100) // 播放百分比
|
|
|
if(this.bufferRate == 0 || this.bufferRate < playVideoTime) {
|
|
|
this.bufferRate = playVideoTime
|
|
|
}
|
|
|
if(this.bufferRate == 0 || Number(this.bufferRate.toFixed(2)) == 0) return
|
|
|
const param = {
|
|
|
+ ...this.urlOption,
|
|
|
uuId: dayjs().format('YYYYMMDD') + this.uuId,
|
|
|
duration: this.playTime,
|
|
|
bufferRate: Number(this.bufferRate.toFixed(2)),
|
|
|
- ...this.urlOption
|
|
|
}
|
|
|
+ if(!param.bufferRate) return
|
|
|
getInternetTraffic(param)
|
|
|
},
|
|
|
getErrMsg(err) {
|