From 0ca3784e7b0830ffaca98b5976a9b91b9e70b004 Mon Sep 17 00:00:00 2001 From: liutian <435757679@qq.com> Date: Mon, 26 Jun 2023 11:06:22 +0800 Subject: [PATCH] fix bug --- gin_wechat_server.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gin_wechat_server.go b/gin_wechat_server.go index b0e329e..962b5aa 100644 --- a/gin_wechat_server.go +++ b/gin_wechat_server.go @@ -56,11 +56,12 @@ func GetWxMsg(c *gin.Context, wxCtx *context.Context, skip bool) (ginWxMsg *GinW return nil, errors.New("签名校验失败") } - // echostr, exists := c.GetQuery("echostr") - // if exists { - // ReulstString(c, echostr) - // return nil, nil - // } + // 如果是签名校验,则原样返回echostr + echostr, exists := c.GetQuery("echostr") + if exists { + ReulstString(c, echostr) + return nil, nil + } msg, err = getMessage(ginWxMsg) if err != nil {