积累
2018-08-15 本文已影响0人
从前慢pearl
1,三种数据获取
POST:
err := json.Unmarshal(this.Ctx.Input.RequestBody, &info)
GET:
pagestr := this.Input().Get("page") //ajax接口传值get方式提交参数
id := this.Ctx.Input.Param(":id") //地址栏传值 http://www.xx/1

POST:
err := json.Unmarshal(this.Ctx.Input.RequestBody, &info)
GET:
pagestr := this.Input().Get("page") //ajax接口传值get方式提交参数
id := this.Ctx.Input.Param(":id") //地址栏传值 http://www.xx/1