mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-21 00:36:44 +08:00
个人主页接口对接
This commit is contained in:
@@ -172,24 +172,6 @@ export default {
|
||||
this.handleScroll
|
||||
);
|
||||
this.couresreso();
|
||||
let event = {
|
||||
key: "ViewArticle",//后台的事件key 发布文章且审核通过
|
||||
title: "阅读文章事件",//事件的标题
|
||||
parameters:"",//用户自定义参数 name:value,name:value
|
||||
content: "记录阅读事件",//事件的内容
|
||||
objId: this.articleId,//关联的id
|
||||
objType: "2",//关联的类型
|
||||
objInfo: "文章",
|
||||
aid: this.userInfo.aid, //当前登录人的id
|
||||
aname: this.userInfo.name,//当前人的姓名
|
||||
status: 1 //状态,直接写1
|
||||
}
|
||||
this.$store.dispatch("userTrigger", event);
|
||||
this.setTime = setTimeout(()=>{
|
||||
event.key = 'ReadArticle';
|
||||
event.title = '阅读文章(大于等于2分钟)';
|
||||
this.$store.dispatch("userTrigger", event);
|
||||
},1000 * 60 *2)
|
||||
},
|
||||
beforeDestroy(){
|
||||
window.removeEventListener("scroll",this.handleScroll);
|
||||
@@ -246,6 +228,24 @@ export default {
|
||||
this.articleDetailData=res.result;
|
||||
//if(this.articleDetailData.toString()!='{}'){
|
||||
this.getAuthorInfo(this.articleDetailData)
|
||||
let event = {
|
||||
key: "ViewArticle",//后台的事件key 发布文章且审核通过
|
||||
title: "阅读文章事件",//事件的标题
|
||||
parameters:"",//用户自定义参数 name:value,name:value
|
||||
content: this.articleDetailData.title,//事件的内容
|
||||
objId: this.articleId,//关联的id
|
||||
objType: "2",//关联的类型
|
||||
objInfo: "文章",
|
||||
aid: this.userInfo.aid, //当前登录人的id
|
||||
aname: this.userInfo.name,//当前人的姓名
|
||||
status: 1 //状态,直接写1
|
||||
}
|
||||
this.$store.dispatch("userTrigger", event);
|
||||
this.setTime = setTimeout(()=>{
|
||||
event.key = 'ReadArticle';
|
||||
event.title = this.articleDetailData.title;
|
||||
this.$store.dispatch("userTrigger", event);
|
||||
},1000 * 60 *2)
|
||||
//}
|
||||
}else{
|
||||
this.noData = false;
|
||||
|
||||
Reference in New Issue
Block a user