From 4fb57517c6d9311bdd22a131717eeab2cd8d837b Mon Sep 17 00:00:00 2001 From: daihh Date: Sat, 22 Oct 2022 17:05:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E9=97=AE=E7=AD=94=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E7=9A=84=E5=A4=84=E7=90=86=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BA=E6=9C=80=E5=A5=BD=E7=AD=94=E6=A1=88?= =?UTF-8?q?=E7=9A=84=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/portal/qa/Answer.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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 = [];