|
@@ -19,6 +19,16 @@ type WechatController struct {
|
|
|
BaseCommonController
|
|
|
}
|
|
|
|
|
|
+type Notify struct {
|
|
|
+ ToUserName string `xml:"ToUserName"`
|
|
|
+ FromUserName string `xml:"FromUserName"`
|
|
|
+ CreateTime int `xml:"CreateTime"`
|
|
|
+ MsgType string `xml:"MsgType"`
|
|
|
+ Event string `xml:"Event"`
|
|
|
+ EventKey string `xml:"EventKey"`
|
|
|
+ Content string `xml:"Content"`
|
|
|
+}
|
|
|
+
|
|
|
// @Title 微信获取签名接口
|
|
|
// @Description 微信获取签名接口
|
|
|
// @Param Url query string true "url地址"
|
|
@@ -28,15 +38,6 @@ func (this *WechatController) Notify() {
|
|
|
echostr := this.GetString("echostr")
|
|
|
method := this.Ctx.Input.Method()
|
|
|
|
|
|
- type Notify struct {
|
|
|
- ToUserName string `xml:"ToUserName"`
|
|
|
- FromUserName string `xml:"FromUserName"`
|
|
|
- CreateTime int `xml:"CreateTime"`
|
|
|
- MsgType string `xml:"MsgType"`
|
|
|
- Event string `xml:"Event"`
|
|
|
- EventKey string `xml:"EventKey"`
|
|
|
- Content string `xml:"Content"`
|
|
|
- }
|
|
|
if method == "POST" {
|
|
|
body := this.Ctx.Input.RequestBody
|
|
|
utils.FileLog.Info("wechat notify:" + string(body))
|