|
@@ -474,13 +474,11 @@ type BindGzhReq struct {
|
|
|
// @Success 200 {object} controllers.BaseResponse
|
|
|
// @router /wx/notify [get,post]
|
|
|
func (u *UserController) Notify() {
|
|
|
- logger.Info("wx notify")
|
|
|
echostr := u.GetString("echostr")
|
|
|
method := u.Ctx.Input.Method()
|
|
|
if method == "POST" {
|
|
|
body := u.Ctx.Input.RequestBody
|
|
|
item := new(Notify)
|
|
|
- logger.Info("wx notify body:", string(body))
|
|
|
err := xml.Unmarshal(body, &item)
|
|
|
if err != nil {
|
|
|
logger.Info("xml.Unmarshal:" + err.Error())
|
|
@@ -509,7 +507,7 @@ func (u *UserController) Notify() {
|
|
|
go auth.BindWxGzhByOpenId(openId)
|
|
|
case "unsubscribe":
|
|
|
fmt.Println("取消关注")
|
|
|
- go auth.BindWxGzhByOpenId(openId)
|
|
|
+ go auth.UnSubscribeWxGzhByOpenId(openId)
|
|
|
case "CLICK":
|
|
|
//returnResult = xmlTpl
|
|
|
default:
|