1
This commit is contained in:
parent
6783b73b53
commit
455120c7ca
@ -3,6 +3,7 @@ package nft
|
|||||||
import (
|
import (
|
||||||
"f5"
|
"f5"
|
||||||
"mt"
|
"mt"
|
||||||
|
"main/common"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -45,35 +46,27 @@ func (this *NftMetaApi) GoldBullion(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *NftMetaApi) HeroHome(c *gin.Context) {
|
func (this *NftMetaApi) HeroHome(c *gin.Context) {
|
||||||
netId := c.Param("netId")
|
meta := mt.Table.NftHomeMeta.GetHeroMeta()
|
||||||
tokenId := c.Param("tokenId")
|
rspObj := new(common.NftHomeMeta)
|
||||||
f5.GetHttpCliMgr().SendGoStyleRequest(
|
if meta != nil {
|
||||||
mt.Table.Config.GetGameApiUrl(),
|
rspObj.Name = meta.GetNftName()
|
||||||
map[string]string{
|
rspObj.Symbol = meta.GetNftSymbol()
|
||||||
"c": "OutAppNft",
|
rspObj.Description = meta.GetNftDescription()
|
||||||
"a": "nftMetaView",
|
rspObj.Image = meta.GetNftImage()
|
||||||
"nft_type": "hero",
|
rspObj.ExternalLink = meta.GetNftExternalLink()
|
||||||
"net_id": netId,
|
}
|
||||||
"token_id": tokenId,
|
c.JSON(200, rspObj)
|
||||||
},
|
|
||||||
func (rsp f5.HttpCliResponse) {
|
|
||||||
c.String(200, rsp.GetRawData())
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *NftMetaApi) GoldBullionHome(c *gin.Context) {
|
func (this *NftMetaApi) GoldBullionHome(c *gin.Context) {
|
||||||
netId := c.Param("netId")
|
meta := mt.Table.NftHomeMeta.GetGoldBullionMeta()
|
||||||
tokenId := c.Param("tokenId")
|
rspObj := new(common.NftHomeMeta)
|
||||||
f5.GetHttpCliMgr().SendGoStyleRequest(
|
if meta != nil {
|
||||||
mt.Table.Config.GetGameApiUrl(),
|
rspObj.Name = meta.GetNftName()
|
||||||
map[string]string{
|
rspObj.Symbol = meta.GetNftSymbol()
|
||||||
"c": "OutAppNft",
|
rspObj.Description = meta.GetNftDescription()
|
||||||
"a": "nftMetaView",
|
rspObj.Image = meta.GetNftImage()
|
||||||
"nft_type": "gold_bullion",
|
rspObj.ExternalLink = meta.GetNftExternalLink()
|
||||||
"net_id": netId,
|
}
|
||||||
"token_id": tokenId,
|
c.JSON(200, rspObj)
|
||||||
},
|
|
||||||
func (rsp f5.HttpCliResponse) {
|
|
||||||
c.String(200, rsp.GetRawData())
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,14 @@ package common
|
|||||||
import (
|
import (
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type NftHomeMeta struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
Symbol string `json:"symbol"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
Image string `json:"image"`
|
||||||
|
ExternalLink string `json:"external_link"`
|
||||||
|
}
|
||||||
|
|
||||||
type App interface {
|
type App interface {
|
||||||
Run(func(), func())
|
Run(func(), func())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user