diff --git a/server/nftserver/api/v1/nft/nftdetail.go b/server/nftserver/api/v1/nft/nftdetail.go index c54dc506..35a7b077 100644 --- a/server/nftserver/api/v1/nft/nftdetail.go +++ b/server/nftserver/api/v1/nft/nftdetail.go @@ -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) {