1
This commit is contained in:
parent
77712249a2
commit
8d767467fc
@ -49,17 +49,19 @@ func (ea *RechargeApi) RechargeList(c *gin.Context) {
|
||||
}
|
||||
|
||||
func (this *RechargeApi) Buy(c *gin.Context) {
|
||||
//passportAddress := c.MustGet("account_address").(string)
|
||||
// reqJson := struct {
|
||||
// NetId int32 `json:"net_id"`
|
||||
// GoodsId int32 `json:"goods_id"`
|
||||
// Num int32 `json:"goods_num"`
|
||||
// AccountAddress string `json:"account_address"`
|
||||
// }{}
|
||||
// if err := c.ShouldBindJSON(&reqJson); err != nil {
|
||||
// f5.RspErr(c, 1, err.Error())
|
||||
// return
|
||||
// }
|
||||
passportAddress := c.MustGet("account_address").(string)
|
||||
reqJson := struct {
|
||||
NetId int32 `json:"net_id"`
|
||||
GoodsId int32 `json:"goods_id"`
|
||||
GoodsNum int32 `json:"goods_num"`
|
||||
AccountAddress string `json:"account_address"`
|
||||
}{}
|
||||
if err := c.ShouldBindJSON(&reqJson); err != nil {
|
||||
f5.RspErr(c, 1, err.Error())
|
||||
return
|
||||
}
|
||||
this.internalBuy(c, reqJson.NetId, reqJson.GoodsId, reqJson.GoodsNum,
|
||||
reqJson.AccountAddress, passportAddress, "")
|
||||
}
|
||||
|
||||
func (this *RechargeApi) BuyWithEmail(c *gin.Context) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user