diff --git a/server/nftserver/api/v1/nft/nftdetail.go b/server/nftserver/api/v1/nft/nftdetail.go index c1631371..9bf58d1c 100644 --- a/server/nftserver/api/v1/nft/nftdetail.go +++ b/server/nftserver/api/v1/nft/nftdetail.go @@ -1,10 +1,10 @@ package nft import ( - "main/constant" "q5" "f5" "mt" + "jccommon" "github.com/gin-gonic/gin" ) @@ -15,18 +15,19 @@ type NftDetailApi struct { 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) + /*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", - "contract_address": contractAddress, + //"contract_address": contractAddress, "net_id": q5.ToString(netId), + "token_type": q5.ToString(jccommon.NFT_TYPE_CFHERO), "token_id": tokenId, }, func (rsp f5.HttpCliResponse) { @@ -37,18 +38,20 @@ func (this *NftDetailApi) Hero(c *gin.Context) { func (this *NftDetailApi) GoldBullion(c *gin.Context) { netId := q5.ToInt32(c.Param("netId")) tokenId := c.Param("tokenId") + /* contractMeta := mt.Table.Contract.GetByNetIdName(netId, constant.CONTRACT_NAME_GoldBrick) contractAddress := "" if contractMeta != nil { contractAddress = contractMeta.GetAddress() - } + }*/ f5.GetHttpCliMgr().SendGoStyleRequest( mt.Table.Config.GetGameApiUrl() + "/webapp/index.php", map[string]string{ "c": "OutAppNft", "a": "nftDetail", - "contract_address": contractAddress, + //"contract_address": contractAddress, "net_id": q5.ToString(netId), + "token_type": q5.ToString(jccommon.NFT_TYPE_GOLD_BULLION), "token_id": tokenId, }, func (rsp f5.HttpCliResponse) { diff --git a/server/nftserver/go.mod b/server/nftserver/go.mod index afafa9f0..6f1a2b57 100644 --- a/server/nftserver/go.mod +++ b/server/nftserver/go.mod @@ -6,6 +6,8 @@ require q5 v1.0.0 require f5 v1.0.0 +require jccommon v1.0.0 + require mt v1.0.0 require ( @@ -59,6 +61,8 @@ replace q5 => ../../third_party/q5 replace f5 => ../../third_party/f5 +replace jccommon => ../jccommon + replace mt => ./mt replace mtb => ./mtb diff --git a/server/nftserver/mt/export.go b/server/nftserver/mt/export.go index 1ec7e865..ca49543b 100644 --- a/server/nftserver/mt/export.go +++ b/server/nftserver/mt/export.go @@ -9,7 +9,7 @@ type table struct { NftDb *NftDbTable Config *ConfigTable NftHomeMeta *NftHomeMetaTable - Contract *ContractTable + //Contract *ContractTable } var Table = f5.New(func(this *table) { @@ -33,6 +33,6 @@ var Table = f5.New(func(this *table) { this.PrimKey = "name" }) - this.Contract = new(ContractTable) + //this.Contract = new(ContractTable) })