From 5f6cccbd0a507e1c646261307e4a63aa24570435 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Tue, 7 Sep 2021 17:42:00 +0800 Subject: [PATCH] aa --- controllers/weixin_callback.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/controllers/weixin_callback.go b/controllers/weixin_callback.go index cb1eec3a1..edf705c54 100644 --- a/controllers/weixin_callback.go +++ b/controllers/weixin_callback.go @@ -1,6 +1,8 @@ package controllers import ( + "git.rosy.net.cn/baseapi/utils" + "io/ioutil" "net/http" "git.rosy.net.cn/jx-callback/globals" @@ -26,3 +28,12 @@ func (c *WeixinController) Msg() { c.ServeJSON() } } + +func (c *WeixinController) WifiMsg() { + data, _ := ioutil.ReadAll(c.Ctx.Request.Body) + values, _ := utils.HTTPBody2Values(data, false) + mapData := utils.URLValues2Map(values) + globals.SugarLogger.Debugf("weixin URL check is:%v", mapData) + c.Data["json"] = "ok" + c.ServeJSON() +}