1
This commit is contained in:
parent
a8047eaada
commit
530c9005f9
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user