...
This commit is contained in:
parent
b409d473d3
commit
00cdf8f967
@ -573,7 +573,7 @@ class MarketController extends BaseController {
|
|||||||
case 1: {
|
case 1: {
|
||||||
$rows = Nft::getNftListByType($account, $type);
|
$rows = Nft::getNftListByType($account, $type);
|
||||||
foreach ($rows as &$row) {
|
foreach ($rows as &$row) {
|
||||||
$nftDb = Nft::getNft($row['token_id']);
|
$nftDb = Nft::findNftByOwner($account, $row['token_id']);
|
||||||
$row['info'] = Nft::toDto($nftDb);
|
$row['info'] = Nft::toDto($nftDb);
|
||||||
$row['detail'] = Hero::toDtoInfo(Hero::findByTokenId2($row['token_id']));
|
$row['detail'] = Hero::toDtoInfo(Hero::findByTokenId2($row['token_id']));
|
||||||
if (in_array($row['info']['info']['job'], $job)==false) continue;
|
if (in_array($row['info']['info']['job'], $job)==false) continue;
|
||||||
@ -599,7 +599,7 @@ class MarketController extends BaseController {
|
|||||||
case 2: {
|
case 2: {
|
||||||
$rows = Nft::getNftListByType($account, $type);
|
$rows = Nft::getNftListByType($account, $type);
|
||||||
foreach ($rows as &$row) {
|
foreach ($rows as &$row) {
|
||||||
$nftDb = Nft::getNft($row['token_id']);
|
$nftDb = Nft::findNftByOwner($account, $row['token_id']);
|
||||||
$row['info'] = Nft::toDto($nftDb);
|
$row['info'] = Nft::toDto($nftDb);
|
||||||
$row['detail'] = Gun::toDtoInfo(Gun::findByTokenId2($row['token_id']));
|
$row['detail'] = Gun::toDtoInfo(Gun::findByTokenId2($row['token_id']));
|
||||||
if ($row['detail']['gun_lv']<$lv) continue;
|
if ($row['detail']['gun_lv']<$lv) continue;
|
||||||
@ -693,7 +693,7 @@ class MarketController extends BaseController {
|
|||||||
$nfts = array();
|
$nfts = array();
|
||||||
for ($x = $start; $x < $page_end; $x++) {
|
for ($x = $start; $x < $page_end; $x++) {
|
||||||
$row = $rows[$x];
|
$row = $rows[$x];
|
||||||
$nftDb = Nft::getNft($row['token_id']);
|
$nftDb = Nft::findNftByOwner($row['owner_address'], $row['token_id']);
|
||||||
if (!$nftDb) {
|
if (!$nftDb) {
|
||||||
myself()->_rspErr(1, 'nft not exists');
|
myself()->_rspErr(1, 'nft not exists');
|
||||||
return;
|
return;
|
||||||
@ -790,7 +790,7 @@ class MarketController extends BaseController {
|
|||||||
|
|
||||||
$conn = myself()->_getMysql('');
|
$conn = myself()->_getMysql('');
|
||||||
|
|
||||||
$nft = Nft::getNft($nft_token);
|
$nft = Nft::findNftByOwner($account, $nft_token);
|
||||||
error_log("sellMyNft ntfDetail token=".json_encode($nft));
|
error_log("sellMyNft ntfDetail token=".json_encode($nft));
|
||||||
$nftDetail = Nft::toDto($nft);
|
$nftDetail = Nft::toDto($nft);
|
||||||
error_log('sellMyNft ntfDetail null'.json_encode($nftDetail));
|
error_log('sellMyNft ntfDetail null'.json_encode($nftDetail));
|
||||||
@ -804,6 +804,7 @@ class MarketController extends BaseController {
|
|||||||
't_market_store',
|
't_market_store',
|
||||||
array(
|
array(
|
||||||
'token_id' => $nft_token,
|
'token_id' => $nft_token,
|
||||||
|
'owner_address' => $nftDetail['owner_address'],
|
||||||
'token_type' => $nftDetail['type'],
|
'token_type' => $nftDetail['type'],
|
||||||
'createtime' => myself()->_getNowTime(),
|
'createtime' => myself()->_getNowTime(),
|
||||||
'modifytime' => myself()->_getNowTime(),
|
'modifytime' => myself()->_getNowTime(),
|
||||||
@ -814,7 +815,6 @@ class MarketController extends BaseController {
|
|||||||
'c_id' => $nftDetail['item_id'],
|
'c_id' => $nftDetail['item_id'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
echo json_encode($r);
|
|
||||||
$this->_rspOk();
|
$this->_rspOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user