This commit is contained in:
aozhiwei 2024-06-20 21:40:23 +08:00
parent 9904a9ed77
commit ee7e7073c3

View File

@ -16,15 +16,16 @@ func (this *NftDetailApi) Hero(c *gin.Context) {
netId := q5.ToInt32(c.Param("netId"))
tokenId := c.Param("tokenId")
contractMeta := mt.Table.Contract.GetByNetIdName(netId, constant.CONTRACT_NAME_CFHero)
if contractMeta == nil {
contractAddress := ""
if contractMeta != nil {
contractAddress = contractMeta.GetAddress()
}
f5.GetHttpCliMgr().SendGoStyleRequest(
mt.Table.Config.GetGameApiUrl() + "/webapp/index.php",
map[string]string{
"c": "OutAppNft",
"a": "nftDetail",
"nft_type": "hero",
"contract_address": contractAddress,
"net_id": q5.ToString(netId),
"token_id": tokenId,
},
@ -34,15 +35,20 @@ func (this *NftDetailApi) Hero(c *gin.Context) {
}
func (this *NftDetailApi) GoldBullion(c *gin.Context) {
netId := c.Param("netId")
netId := q5.ToInt32(c.Param("netId"))
tokenId := c.Param("tokenId")
contractMeta := mt.Table.Contract.GetByNetIdName(netId, constant.CONTRACT_NAME_CFHero)
contractAddress := ""
if contractMeta != nil {
contractAddress = contractMeta.GetAddress()
}
f5.GetHttpCliMgr().SendGoStyleRequest(
mt.Table.Config.GetGameApiUrl() + "/webapp/index.php",
map[string]string{
"c": "OutAppNft",
"a": "nftDetail",
"nft_type": "gold_bullion",
"net_id": netId,
"contract_address": contractAddress,
"net_id": q5.ToString(netId),
"token_id": tokenId,
},
func (rsp f5.HttpCliResponse) {