diff --git a/controllers/aliapi_callback.go b/controllers/aliapi_callback.go new file mode 100644 index 000000000..efbcdd5c2 --- /dev/null +++ b/controllers/aliapi_callback.go @@ -0,0 +1,30 @@ +package controllers + +import ( + "fmt" + "git.rosy.net.cn/baseapi/utils" + "github.com/astaxie/beego/server/web" + "io/ioutil" +) + +type AliApiController struct { + web.Controller +} + +type CallBack struct { + Code int `json:"code"` + Msg string `json:"msg"` +} + +func (c *AliApiController) SecretNumberMsg() { + data, _ := ioutil.ReadAll(c.Ctx.Request.Body) + values, _ := utils.HTTPBody2Values(data, false) + fmt.Println(values) + mapData := utils.URLValues2Map(values) + fmt.Println(mapData) + c.Data["json"] = &CallBack{ + Code: 0, + Msg: "成功", + } + c.ServeJSON() +}