From f27a682cee45113fd0062edb64f33f49560bd389 Mon Sep 17 00:00:00 2001 From: taoshihan1991 <630892807@qq.com> Date: Tue, 12 Jan 2021 14:18:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BF=AB=E6=8D=B7=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/reply.go | 4 ++-- static/html/chat_main.html | 16 +++++++++++++--- static/js/chat-main.js | 11 ++++++++++- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/controller/reply.go b/controller/reply.go index c742a92..5ad07b0 100644 --- a/controller/reply.go +++ b/controller/reply.go @@ -80,8 +80,8 @@ func PostReplySearch(c *gin.Context) { kefuId, _ := c.Get("kefu_name") search := c.PostForm("search") if search == "" { - c.JSON(400, gin.H{ - "code": 200, + c.JSON(200, gin.H{ + "code": 400, "msg": "参数错误", }) return diff --git a/static/html/chat_main.html b/static/html/chat_main.html index 483b62f..8ad5dbb 100644 --- a/static/html/chat_main.html +++ b/static/html/chat_main.html @@ -4,7 +4,7 @@ 聊天界面 - + @@ -205,7 +205,17 @@
- + + + +
<{item.item_content}>   删除
+ +添加回复内容 + -删除组 +
+
+
- + \ No newline at end of file diff --git a/static/js/chat-main.js b/static/js/chat-main.js index 2a191c3..563796c 100644 --- a/static/js/chat-main.js +++ b/static/js/chat-main.js @@ -40,6 +40,8 @@ var app=new Vue({ replyGroupDialog:false, replyContentDialog:false, replySearch:"", + replySearchList:[], + replySearchListActive:[], groupName:"", groupId:"", replys:[], @@ -666,8 +668,15 @@ var app=new Vue({ //搜索回复 searchReply(){ var _this=this; + _this.replySearchListActive=[]; + if(this.replySearch==""){ + _this.replySearchList=[]; + } this.sendAjax("/reply_search","post",{search:this.replySearch},function(result){ - _this.replys=result; + _this.replySearchList=result; + for (var i in result) { + _this.replySearchListActive.push(result[i].group_id); + } }); }, //获取黑名单