提交对事件的发送修改

This commit is contained in:
daihh
2022-10-11 20:01:48 +08:00
parent 64cfa9e2d9
commit 243a137765
3 changed files with 9 additions and 5 deletions

View File

@@ -48,6 +48,7 @@ const user = {
actions: {
// /用户触发事件
userTrigger({ commit }, event) {
event.source='page';
apiStat.sendEvent(event).then(res=>{
console.log(res,'userTrigger');
})

View File

@@ -222,6 +222,7 @@ export default {
},
//获取文章详细信息
getArticleDetail(){
let $this=this;
apiArticle.detail(this.articleId,true).then(res=>{
if(res.status==200){
res.result.avatar='';
@@ -236,6 +237,7 @@ export default {
title: "查看文章",//事件的标题
parameters:"",//用户自定义参数 name:value,name:value
content: "查看了文章",//事件的内容
source:'page',
objId: this.articleId,//关联的id
objType: "2",//关联的类型
objInfo: this.articleDetailData.title,
@@ -248,8 +250,8 @@ export default {
event.key = 'ReadArticle';
event.title = "阅读文章";
event.content = "阅读了文章"
this.$store.dispatch("userTrigger", event);
},1000 * 60 *2)
$this.$store.dispatch("userTrigger", event);
},2000);
//}
}else{
this.noData = false;
@@ -292,7 +294,7 @@ export default {
background: url('/images/article-banner.png');
}
.course-resources{
margin-top: 26px;
img{
width: 100%;

View File

@@ -529,8 +529,9 @@
this.contentData.status = 2; //进行中
}
if (this.contentData.contentType > 20) { //非视频类的
this.isAppendTime = true;
this.appendStudyTime();
//用户的学习时长,只是视听课的学习时长,所以这里不要追加学习时长
this.isAppendTime = false;
//this.appendStudyTime();
this.handleTimeout = setTimeout(function() {
$this.saveStudyInfo();
}, 5000); //5秒后记录学习完成