1
This commit is contained in:
parent
b3e09a8b14
commit
7e8b5a2276
@ -233,6 +233,7 @@ class OutAppNftController extends BaseController {
|
||||
|
||||
private function internalNftDetail($netId, &$nftDb, &$info)
|
||||
{
|
||||
$onSale = $this->nftIsOnSale($nftDb['net_id'], $nftDb['contract_address'], $nftDb['token_id']);
|
||||
$info = array(
|
||||
'net_id' => $netId,
|
||||
'contract_address' => '',
|
||||
@ -243,6 +244,7 @@ class OutAppNftController extends BaseController {
|
||||
'item_id' => 0,
|
||||
'type' => 0,
|
||||
'image' => '',
|
||||
'on_sale' => $onSale,
|
||||
'detail' => array()
|
||||
);
|
||||
if (!empty($nftDb)) {
|
||||
@ -361,8 +363,24 @@ class OutAppNftController extends BaseController {
|
||||
'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(
|
||||
myself()->_getMarketMysql(),
|
||||
't_order',
|
||||
array(
|
||||
'net_id' => $netId,
|
||||
'contract_address' => $contractAddress,
|
||||
'token_id' => $tokenId,
|
||||
'status' => 'ACTIVE',
|
||||
)
|
||||
);
|
||||
return $row ? 1 : 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user