Commit f098b536 by wangshuo

学习进度统计

parent e103d061
...@@ -500,7 +500,7 @@ class Video extends Component { ...@@ -500,7 +500,7 @@ class Video extends Component {
this.count = this.watchSec = 0 this.count = this.watchSec = 0
} else { } else {
!this.player.paused() && this.watchSec++ !this.player.paused() && this.watchSec++
this.count++ !this.player.paused() && this.count++
} }
} }
}, 1000) }, 1000)
...@@ -556,7 +556,8 @@ class Video extends Component { ...@@ -556,7 +556,8 @@ class Video extends Component {
}) })
this.player.on('ended', () => { this.player.on('ended', () => {
console.log('ended'); console.log('ended');
this.sendWatchTime(this.watchSec, this.currentPlaybackRate) this.sendWatchTime(this.watchSec, this.currentPlaybackRate);
this.count = this.watchSec = 0;
this.countSchedule(); // 计算进度 -- 播放完毕 this.countSchedule(); // 计算进度 -- 播放完毕
// 返现课程才出现打卡记录 // 返现课程才出现打卡记录
if(this.state.course.is_aist) { if(this.state.course.is_aist) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment