mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 19:06:43 +08:00
课程详情非音频第一次十五秒发送
This commit is contained in:
@@ -489,18 +489,18 @@
|
||||
"aname":this.userInfo.name,//当前人的姓名
|
||||
"status": 1 //状态
|
||||
}
|
||||
//静默处理
|
||||
apiStat.sendEvent(postData).then(rs=>{
|
||||
if(rs.status != 200) {
|
||||
console.log(rs.message);
|
||||
}
|
||||
});
|
||||
//每一分钟保存一次
|
||||
// 取消阅读的每分钟六十秒的计时,最多是设置的时间或默认时间
|
||||
let $this=this;
|
||||
this.appendStudyOtherHandle = setTimeout(function() {
|
||||
$this.cumulativeDuration += 60;
|
||||
if($this.cumulativeDuration <= $this.maxDuration){
|
||||
//静默处理
|
||||
apiStat.sendEvent(postData).then(rs=>{
|
||||
if(rs.status != 200) {
|
||||
console.log(rs.message);
|
||||
}
|
||||
});
|
||||
$this.appendStudyOtherTime();
|
||||
}else{
|
||||
clearTimeout(this.appendStudyOtherHandle);
|
||||
@@ -681,12 +681,25 @@
|
||||
|
||||
this.appendStudyOtherHandle = setTimeout(function() {
|
||||
// 开始之前把响应式清空
|
||||
this.maxDuration = 0;
|
||||
this.cumulativeDuration = 0;
|
||||
// 没有设置默认时长
|
||||
this.maxDuration = r.duration !== 0 ? r.duration : this.defaultMaxTime;
|
||||
$this.maxDuration = 0;
|
||||
$this.cumulativeDuration = 0;
|
||||
// 没有设置默认时长三十分钟,
|
||||
$this.maxDuration = r.duration !== 0 ? r.duration * 2 : $this.defaultMaxTime;
|
||||
$this.$store.dispatch("userTrigger", {
|
||||
"key": "StudyCourseOther",//课程学习的key
|
||||
"title": "非音视频课内容",//事件的标题
|
||||
"parameters":"second:15",//second:value 本次的学习时长
|
||||
"content": "学习课程",//事件的内容
|
||||
"objId": $this.courseInfo.id,//课程的id
|
||||
"objType": "1",//类型
|
||||
"source":"page",
|
||||
"objInfo": ""+$this.courseInfo.name,
|
||||
"aid":$this.userInfo.aid, //当前登录人的id
|
||||
"aname":$this.userInfo.name,//当前人的姓名
|
||||
"status": 1 //状态
|
||||
});
|
||||
$this.appendStudyOtherTime();
|
||||
}, 1000*60*2); //非音视频课程学习,2分钟后记录,因为一次记录是60秒
|
||||
}, 15000); //非音视频课程学习,十五秒后记录
|
||||
//this.appendStudyTime();
|
||||
if (this.contentData.contentType != 50) {
|
||||
this.handleTimeout = setTimeout(function(){
|
||||
|
||||
Reference in New Issue
Block a user