From 784506b4de312330ebe5617b297d28b4f7c83698 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Fri, 1 Sep 2023 14:54:10 +0800 Subject: [PATCH] update --- app/hdl/hdl_wx.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/hdl/hdl_wx.go b/app/hdl/hdl_wx.go index 28d8090..91fc9bc 100644 --- a/app/hdl/hdl_wx.go +++ b/app/hdl/hdl_wx.go @@ -87,7 +87,7 @@ type WXEventForScanMsg struct { func WXMsgReceive(c *gin.Context) { log.Printf("[消息接收] - 收到新消息") var msg WXMsg - err := c.ShouldBindXML(&msg) + err := c.ShouldBindJSON(&msg) if err != nil { log.Printf("[消息接收] - XML数据包解析失败: %v\n", err) return @@ -147,6 +147,7 @@ func WXMsgReceive(c *gin.Context) { } c.String(http.StatusOK, "") + return } // WXRepTextMsg 微信回复文本消息结构体