This commit is contained in:
aozhiwei 2024-08-13 15:24:56 +08:00
parent 8d767467fc
commit 34a4edc901

View File

@ -65,6 +65,20 @@ func (this *RechargeApi) Buy(c *gin.Context) {
}
func (this *RechargeApi) BuyWithEmail(c *gin.Context) {
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"`
Email string `json:"email"`
}{}
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, reqJson.Email)
}
func (this *RechargeApi) internalBuy(c *gin.Context,