package controllers import ( "encoding/json" "eta/eta_mini_bridge/models" "eta/eta_mini_bridge/models/request" ) type WeChatController struct { BaseAuthController } // @Title 发送微信模板接口 // @Description 发送微信模板接口 // @Param Url query string true "url地址" // @Success 200 {object} models.WechatSign // @router /send_template_msg [post] func (this *WeChatController) SendTemplateMsg() { br := new(models.BaseResponse).Init() defer func() { this.Data["json"] = br this.ServeJSON() }() var req request.SendWxTemplateReq if err := json.Unmarshal(this.Ctx.Input.RequestBody, &req); err != nil { br.Msg = "参数错误" br.ErrMsg = "参数解析错误,Err:" + err.Error() return } }