1
This commit is contained in:
parent
b3e09a8b14
commit
7e8b5a2276
@ -233,6 +233,7 @@ class OutAppNftController extends BaseController {
|
|||||||
|
|
||||||
private function internalNftDetail($netId, &$nftDb, &$info)
|
private function internalNftDetail($netId, &$nftDb, &$info)
|
||||||
{
|
{
|
||||||
|
$onSale = $this->nftIsOnSale($nftDb['net_id'], $nftDb['contract_address'], $nftDb['token_id']);
|
||||||
$info = array(
|
$info = array(
|
||||||
'net_id' => $netId,
|
'net_id' => $netId,
|
||||||
'contract_address' => '',
|
'contract_address' => '',
|
||||||
@ -243,6 +244,7 @@ class OutAppNftController extends BaseController {
|
|||||||
'item_id' => 0,
|
'item_id' => 0,
|
||||||
'type' => 0,
|
'type' => 0,
|
||||||
'image' => '',
|
'image' => '',
|
||||||
|
'on_sale' => $onSale,
|
||||||
'detail' => array()
|
'detail' => array()
|
||||||
);
|
);
|
||||||
if (!empty($nftDb)) {
|
if (!empty($nftDb)) {
|
||||||
@ -361,8 +363,24 @@ class OutAppNftController extends BaseController {
|
|||||||
'item_id' => 0,
|
'item_id' => 0,
|
||||||
'type' => $info['type'],
|
'type' => $info['type'],
|
||||||
'image' => "https://res2.counterfire.games/nft/box/Gen2_raw.gif",
|
'image' => "https://res2.counterfire.games/nft/box/Gen2_raw.gif",
|
||||||
|
'on_sale' => $info['on_sale'],
|
||||||
'detail' => array()
|
'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