diff --git a/doc/Nft.py b/doc/Nft.py index 8856f934..cacd8262 100644 --- a/doc/Nft.py +++ b/doc/Nft.py @@ -56,6 +56,7 @@ class NftInfo(object): ['item_id', 0, 'item_id'], ['token_id', 0, 'token_id'], ['token_type', 0, 'token_type'], + ['contract_address', 0, '合约地址'], ['createtime', 0, 'createtime'], ['!details', [], '详细'], ] \ No newline at end of file diff --git a/webapp/controller/NftController.class.php b/webapp/controller/NftController.class.php index a45583a4..1022d11e 100644 --- a/webapp/controller/NftController.class.php +++ b/webapp/controller/NftController.class.php @@ -21,6 +21,7 @@ class NftController extends BaseAuthedController "item_id" => $nft['item_id'], "token_id" => $nft['token_id'], "token_type" => $nft['token_type'], + "contract_address" => $nft['contract_address'], "createtime" => $nft['createtime'], "details" => array(), ); diff --git a/webapp/models/Chip.php b/webapp/models/Chip.php index b476614f..2903adc6 100644 --- a/webapp/models/Chip.php +++ b/webapp/models/Chip.php @@ -186,12 +186,12 @@ class Chip extends BaseModel 'rand_attr'=> $rand_attr, ); $dto['chip_name'] = mt\Item::get($row['item_id'])?mt\Item::get($row['item_id'])['name']:'XXX'; - $nft_address = ''; - $contract = ContractConfig::find(ContractConfig::ERC721); - if ($dto['token_id']){ - $nft_address = $contract ? $contract['chip'] : ""; - } - $dto['nft_address'] = $nft_address; +// $nft_address = ''; +// $contract = ContractConfig::find(ContractConfig::ERC721); +// if ($dto['token_id']){ +// $nft_address = $contract ? $contract['chip'] : ""; +// } +// $dto['nft_address'] = $nft_address; $dto['tags'] = ''; return $dto; } diff --git a/webapp/models/Gun.php b/webapp/models/Gun.php index 45c2f18e..72a1bdf4 100644 --- a/webapp/models/Gun.php +++ b/webapp/models/Gun.php @@ -286,13 +286,13 @@ class Gun extends BaseModel { ); - $nft_address = ''; - $contract = ContractConfig::find(ContractConfig::ERC721); - if ($row['token_id']){ - $nft_address = $contract ? $contract['gun'] : ""; - } - - $dto['nft_address'] = $nft_address; +// $nft_address = ''; +// $contract = ContractConfig::find(ContractConfig::ERC721); +// if ($row['token_id']){ +// $nft_address = $contract ? $contract['gun'] : ""; +// } +// +// $dto['nft_address'] = $nft_address; return $dto; } diff --git a/webapp/models/Hero.php b/webapp/models/Hero.php index f6fc0b40..d873ca0f 100644 --- a/webapp/models/Hero.php +++ b/webapp/models/Hero.php @@ -304,12 +304,12 @@ class Hero extends BaseModel { ); - $nft_address = ''; - $contract = ContractConfig::find(ContractConfig::ERC721); - if ($row['token_id']){ - $nft_address = $contract ? $contract['hero'] : ""; - } - $dto['nft_address'] = $nft_address; +// $nft_address = ''; +// $contract = ContractConfig::find(ContractConfig::ERC721); +// if ($row['token_id']){ +// $nft_address = $contract ? $contract['hero'] : ""; +// } +// $dto['nft_address'] = $nft_address; return $dto; }