aa
This commit is contained in:
30
controllers/aliapi_callback.go
Normal file
30
controllers/aliapi_callback.go
Normal file
@@ -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()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user