diff --git a/doc/AANft.py b/doc/AANft.py index 93d56e59..6f517b10 100644 --- a/doc/AANft.py +++ b/doc/AANft.py @@ -38,7 +38,7 @@ class AANft(object): [':token_id', '', 'tokenId'], ], 'response': [ - _common.NftHomeMeta(), + _common.NftHeroMeta(), ] }, { @@ -51,7 +51,7 @@ class AANft(object): [':token_id', '', 'tokenId'], ], 'response': [ - _common.NftHomeMeta(), + _common.NftHeroMeta(), ] }, ] diff --git a/doc/_common.py b/doc/_common.py index e871f05d..074855b7 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -1680,3 +1680,31 @@ class NftHomeMeta(object): ['image', '', 'nft图片地址'], ['external_link', '', 'nft链接'], ] + +class NftAttribute(object): + + def __init__(self): + self.fields = [ + ['trait_type', '', '属性名'], + ['value', '', '属性值'], + ] + +class NftHeroMeta(object): + + def __init__(self): + self.fields = [ + ['name', '', 'nft名字'], + ['description', '', 'nft描述'], + ['image', '', 'nft图片地址'], + ['!attrigutes', [NftAttribute()], 'nft属性'], + ] + +class NftGoldBullionMeta(object): + + def __init__(self): + self.fields = [ + ['name', '', 'nft名字'], + ['description', '', 'nft描述'], + ['image', '', 'nft图片地址'], + ['!attrigutes', [NftAttribute()], 'nft属性'], + ] diff --git a/webapp/controller/OutAppNftController.class.php b/webapp/controller/OutAppNftController.class.php index c9a1a8b4..5ef7eb33 100644 --- a/webapp/controller/OutAppNftController.class.php +++ b/webapp/controller/OutAppNftController.class.php @@ -2,9 +2,11 @@ use phpcommon\SqlHelper; require_once('models/Nft.php'); require_once('models/User.php'); +require_once('models/Hero.php'); use models\Nft; use models\User; +use models\Hero; class OutAppNftController extends BaseController { public function getNftList(){ @@ -189,6 +191,7 @@ class OutAppNftController extends BaseController { } break; } + error_log(json_encode($info)); myself()->_rspData($info); }