diff --git a/src/views/portal/qa/Answer.vue b/src/views/portal/qa/Answer.vue index 597fa67e..13d894d0 100644 --- a/src/views/portal/qa/Answer.vue +++ b/src/views/portal/qa/Answer.vue @@ -723,25 +723,26 @@ export default { const { id } = data; apiQa.isBest(id).then(res => { if (res.status == 200) { - this.$message({ type: "success", message: "设置为最佳答案成功" }); this.messageSave("set"); //消息 + console.log(data,'data'); let event = { key: "AnswerBest",//设置为最佳答案 title: "回答被选为最佳答案",// - parameters:"author:"+this.data.sysCreateAid,//内容的作者 + parameters:"author:"+data.sysCreateAid,//内容的作者 content: '回答被选为最佳答案',//事件的内容 - objId: this.data.id,//关联的id - objType: this.type,//关联的类型 - objInfo: this.data.title, + objId: data.id,//关联的id + objType: '5',//关联的类型 + objInfo: '设置最佳答案', aid: this.userInfo.aid, //当前登录人的id aname: this.userInfo.name,//当前人的姓名 status: 1 //状态,直接写1 } + console.log(event,'event'); this.$store.dispatch("userTrigger", event); this.loadAnswer(); this.getQuestionDetail(); - + this.$message({ type: "success", message: "设置为最佳答案成功" }); }else{ this.$message({ type: "warning",message: "设置为最佳答案失败:"+res.message}); } @@ -815,7 +816,7 @@ export default { this.replyContent = ''; //添加到页面中 if (data.clevel < 3) { - if (data.answers) { + if(data.answers) { data.answers.push(res.result); } else { data.answers = [];