This commit is contained in:
daihh
2022-10-24 18:50:30 +08:00

View File

@@ -393,12 +393,45 @@ export default {
// }
this.isPraise=true;
this.$message({message:'点赞成功',type:'success'})
let contentText = '';
if(this.type==1){
contentText='课程';
// conType = this.data.type;
}
if(this.type==2){
contentText='文章'
}
if(this.type==3){
contentText='案例'
}
if(this.type==4){
contentText='提问'
}
if(this.type==5){
contentText='回答'
}
if(this.type==6){
contentText='课程笔记'
}
if(this.type==60){
contentText='课程笔记评论'
}
// 点赞type
if(this.type==10){
contentText='课程评论'
}
if(this.type==20){
contentText='文章评论'
}
if(this.type==30){
contentText='案例评论'
}
if(this.userInfo.aid!=this.data.sysCreateAid){
let event = {
key: "Praise",//后台的事件key 发布文章且审核通过
title: "点赞",//事件的标题
parameters:"author:"+this.data.sysCreateAid,//用户自定义参数 name:value,name:value
content: "点赞"+postData.title,//事件的内容
content: "点赞"+contentText,//事件的内容
objId: this.data.id,//关联的id
objType: this.type,//关联的类型
objInfo: this.data.title,