提交对事件的发送修改

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: { actions: {
// /用户触发事件 // /用户触发事件
userTrigger({ commit }, event) { userTrigger({ commit }, event) {
event.source='page';
apiStat.sendEvent(event).then(res=>{ apiStat.sendEvent(event).then(res=>{
console.log(res,'userTrigger'); console.log(res,'userTrigger');
}) })

View File

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

View File

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