diff --git a/doc/OutAppNft.py b/doc/OutAppNft.py index d62d8e05..8b566c80 100644 --- a/doc/OutAppNft.py +++ b/doc/OutAppNft.py @@ -6,20 +6,6 @@ class OutAppNft(object): def __init__(self): self.apis = [ - { - 'name': 'getNftList', - 'desc': 'nft列表', - 'group': 'OutAppNft', - 'url': 'webapp/index.php?c=OutAppNft&a=getNftList', - 'params': [ - ['address', '', '钱包地址'], - ['type', 0, '类型 1:英雄 6:gacha 7:勋章 8:星球'], - ], - 'response': [ - _common.RspHead(), - ['!nfts', [NftInfo()], 'nft列表'], - ] - }, { 'name': 'getWebInfo', 'desc': 'web信息', diff --git a/doc/README.php b/doc/README.php index a328fa3e..5d6aee0e 100644 --- a/doc/README.php +++ b/doc/README.php @@ -56,6 +56,7 @@ * 删除 c=BlockChain&a=getJumpInfo * 删除 c=BlockChain&a=buyDiamond * 删除 c=BlockChain&a=buyMallProduct + * 删除 c=OutAppNft&a=getNftList * * */ diff --git a/doc/_common.py b/doc/_common.py index 98dbe874..01355ebd 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -1758,6 +1758,9 @@ class NftHeroDetailNew(object): ['def', 0, '攻击'], ['block', 0, '格挡'], ['crit', 0, '暴击'], + ['chip_slots', 0, '芯片槽数'], + ['combat_ability_1', '', '战斗能力1'], + ['combat_ability_2', '', '战斗能力2'], ] class NftGoldBullionDetail(object): diff --git a/webapp/controller/BigwheelController.class.php b/webapp/controller/BigwheelController.class.php index bf6d5f28..ee9c90e0 100644 --- a/webapp/controller/BigwheelController.class.php +++ b/webapp/controller/BigwheelController.class.php @@ -341,6 +341,7 @@ class BigwheelController extends BaseAuthedController { 'property_chg' => $this->propertyChgService->toDto(), 'info' => $info )); + //myself()->_fireEvent('Bigwheel', 'onBuyOk', $info); } private function getMidDataKey() diff --git a/webapp/controller/OutAppNftController.class.php b/webapp/controller/OutAppNftController.class.php index 3da0bd99..10df7c2c 100644 --- a/webapp/controller/OutAppNftController.class.php +++ b/webapp/controller/OutAppNftController.class.php @@ -14,40 +14,6 @@ use models\Hero; class OutAppNftController extends BaseController { - public function getNftList(){ - $address = getReqVal('address', ''); - $type = getReqVal('type', ''); - if ($type){ - $nftList = Nft::getNftListByType($address,$type); - }else{ - $nftList = Nft::getNftList($address); - } - $listInfo = array(); - if ($nftList){ - foreach ($nftList as $nft) { - $image = 'https://www.cebg.games/res/avatars/' . $nft['item_id'] . '.png'; - $full_image = 'https://www.cebg.games/res/avatars/full_' . $nft['item_id'] . '.png'; - $info = array( - "idx" => $nft['idx'], - "owner_address" => $nft['owner_address'], - "item_id" => $nft['item_id'], - "token_id" => $nft['token_id'], - "token_type" => $nft['token_type'], - "contract_address" => $nft['contract_address'], - 'image' => $image, - 'full_image' => $full_image, - "details" => array(), - ); - array_push($listInfo,$info); - } - } - - $this->_rspData(array( - 'nfts' => $listInfo, - )); - - } - public function getWebInfo(){ $channel = getReqVal('channel', ''); $openId = getReqVal('openId', ''); @@ -211,9 +177,6 @@ class OutAppNftController extends BaseController { "trait_type" => "Luck Value", "value" => floor($lucky * (1+$lucky_rate)), )); - if ($this->isCloseBox()) { - $this->fillBoxMeta($info); - } } break; case Nft::GOLD_BULLION_TYPE: @@ -223,9 +186,6 @@ class OutAppNftController extends BaseController { $info['name'] = $nftMeta['name']; $info['description'] = $nftMeta['desc']; $info['image'] = "https://res2.counterfire.games/nft/meta/".$nftDb['item_id'].".png"; - if ($this->isCloseBox()) { - $this->fillBoxMeta($info); - } } break; } @@ -355,9 +315,6 @@ class OutAppNftController extends BaseController { $info['detail']['crit'] = $heroAbility['critical']; } } - if ($this->isCloseBox()) { - $this->fillBoxDetail($info); - } } break; case Nft::GOLD_BULLION_TYPE: @@ -371,9 +328,6 @@ class OutAppNftController extends BaseController { $info['image'] = 'https://res2.counterfire.games/nft/meta/' . $nftMeta['item_id'] . '.png'; $info['detail']['gold_coins'] = $this->getGoldBullionGoldNum($nftDb['item_id']); } - if ($this->isCloseBox()) { - $this->fillBoxDetail($info); - } } break; case Nft::FOUNDER_TAG_TYPE: @@ -426,46 +380,6 @@ class OutAppNftController extends BaseController { } } - private function isCloseBox() - { - $tokenId = getReqVal('token_id', ''); - if ($tokenId == '6240619010000001') { - return false; - } - $openTime = 1719828000 + 3600 * 24; - if (myself()->_getNowTime() < $openTime) { - if (SERVER_ENV == _ONLINE) { - return true; - } - } - return false; - } - - private function fillBoxMeta(&$info) - { - $info['name'] = 'Genesis Hero'; - $info['description'] = 'Genesis Hero'; - $info['image'] = "https://res2.counterfire.games/nft/box/Gen2_raw.gif"; - $info['attributes'] = array(); - } - - private function fillBoxDetail(&$info) - { - $info = array( - 'net_id' => $info['net_id'], - 'contract_address' => $info['contract_address'], - 'token_id' => $info['token_id'], - 'owner_address' => $info['owner_address'], - 'meta_url' => $info['meta_url'], - 'name' => 'Genesis Hero', - 'item_id' => 0, - 'type' => $info['type'], - 'image' => "https://res2.counterfire.games/nft/box/Gen2_raw.gif", - 'on_sale' => $info['on_sale'], - 'detail' => array() - ); - } - private function nftIsOnSale($netId, $contractAddress, $tokenId) { $row = SqlHelper::ormSelectOne(