0 ? $tmpStrs[0] : ''; $this->nftInfo(explode('/', $requestUri)); } } } private function nftInfo($path) { $nftView = array( 'name' => '', 'description' => '', 'image' => '' ); $tokenId = $path[4]; if (empty($tokenId)) { myself()->_rspRawData($nftView); return; } if ($this->procTestNft($tokenId, $nftView)){ myself()->_rspRawData($nftView); return; } $nftDb = Nft::getNft($tokenId); if (empty($nftDb)) { myself()->_rspRawData($nftView); return; } Nft::toNftView($nftDb, $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'] = 'https://www.cebg.games/res/nfts/CEBG_Space_Hero.png'; $nftView['description'] = 'CEBG Airdrop Hero'; return true; } if (in_array($tokenId, $weaponBoxes)) { $nftView['name'] = 'CEBG Airdrop Weapon'; $nftView['image'] = 'https://www.cebg.games/res/nfts/CEBG_Space_Weapon.png'; $nftView['description'] = 'CEBG Airdrop Weapon'; return true; } return false; } }