Commit 3b7f13bd authored by duanjinfei's avatar duanjinfei

Merge branch 'test'

parents 3091a1a1 0079ae41
......@@ -142,7 +142,9 @@ func (c *LotteryController) ForwardReq() {
c.ResponseInfo(500, models.PARAM_ERR, nil)
return
}
uri, err := erc721.TokenURI(&bind.CallOpts{}, idBigInt)
uri := ""
if utils.TokenUriMap[nftAddr] == "" {
uri, err = erc721.TokenURI(&bind.CallOpts{}, idBigInt)
if err != nil || uri == "" {
c.ResponseInfo(500, models.FAILED, nil)
return
......@@ -150,7 +152,7 @@ func (c *LotteryController) ForwardReq() {
if strings.HasPrefix(uri, "ipfs://") {
uri = beego.AppConfig.String("beforeEndReqUrl") + uri[7:]
}
if utils.TokenUriMap[nftAddr] != "" {
} else {
uri = utils.TokenUriMap[nftAddr] + id
}
client := &http.Client{}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment