add test Nft
This commit is contained in:
parent
48ca58070c
commit
81382f07e5
@ -58,6 +58,10 @@ class RestApiController extends BaseController {
|
|||||||
myself()->_rspRawData($nftView);
|
myself()->_rspRawData($nftView);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ($this->procTestNft($tokenId, $nftView)){
|
||||||
|
myself()->_rspRawData($nftView);
|
||||||
|
return;
|
||||||
|
}
|
||||||
$nftDb = Nft::getNft($tokenId);
|
$nftDb = Nft::getNft($tokenId);
|
||||||
if (empty($nftDb)) {
|
if (empty($nftDb)) {
|
||||||
myself()->_rspRawData($nftView);
|
myself()->_rspRawData($nftView);
|
||||||
@ -67,4 +71,30 @@ class RestApiController extends BaseController {
|
|||||||
myself()->_rspRawData($nftView);
|
myself()->_rspRawData($nftView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function procTestNft($tokenId, &$nftView)
|
||||||
|
{
|
||||||
|
$heroBoxes = array(
|
||||||
|
'6022513565100001',
|
||||||
|
'6022513565100002',
|
||||||
|
'6022513565100003',
|
||||||
|
);
|
||||||
|
$weaponBoxes = array(
|
||||||
|
'6022513565100004',
|
||||||
|
'6022513565100005'
|
||||||
|
);
|
||||||
|
if (in_array($tokenId, $heroBoxes)) {
|
||||||
|
$nftView['name'] = 'CEBG Airdrop Hero';
|
||||||
|
$nftView['image'] = 'CEBG Airdrop Hero';
|
||||||
|
$nftView['description'] = 'https://www.cebg.games/res/nfts/CEBG_Space_Hero.png';
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (in_array($tokenId, $weaponBoxes)) {
|
||||||
|
$nftView['name'] = 'CEBG Airdrop Weapon';
|
||||||
|
$nftView['image'] = 'CEBG Airdrop Weapon';
|
||||||
|
$nftView['description'] = 'https://www.cebg.games/res/nfts/CEBG_Space_Weapon.png';
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user