This commit is contained in:
aozhiwei 2024-08-07 15:49:49 +08:00
parent 5b9290558e
commit 47b5018d19

View File

@ -107,7 +107,8 @@ func (this *RechargeApi) Buy(c *gin.Context) {
return
}
}
price := q5.PowInt64(10, currencyMeta.GetCurrencyDecimal()) * q5.ToInt64(reqJson.Num)
price := q5.PowInt64(10, currencyMeta.GetCurrencyDecimal()) * q5.ToInt64(goodsMeta.GetPrice()) *
q5.ToInt64(reqJson.Num)
params := map[string]string{
"c": "BcService",
"a": "recharge",
@ -125,7 +126,7 @@ func (this *RechargeApi) Buy(c *gin.Context) {
Calls []jccommon.ContractCall `json:"calls"`
}{}
var itemNum int32 = reqJson.Num
var diamond int64 = currencyMeta.GetExchangeRate() * int64(1) * int64(itemNum)
var diamond int64 = currencyMeta.GetExchangeRate() * q5.ToInt64(goodsMeta.GetDiamond()) * int64(itemNum)
url := fmt.Sprintf("%s/webapp/index.php", mt.Table.Web3SignCluster.RandElement().GetUrl())
f5.GetHttpCliMgr().SendGoStyleRequest(
url,