This commit is contained in:
songliang 2023-01-09 17:16:28 +08:00
parent 87aeb283cd
commit 535b31ccac

View File

@ -575,6 +575,9 @@ class MarketController extends BaseController {
$rows = array_merge($rows, $this->listMySelledNfts($account, $type));
foreach ($rows as &$row) {
$nftDb = Nft::findNftByOwner($account, $row['token_id']);
if (empty($nftDb)) {
$nftDb = Nft::getNft($row['token_id']);
}
$row['info'] = Nft::toDto($nftDb);
$row['detail'] = Hero::toDtoInfo(Hero::findByTokenId2($row['token_id']));
if (in_array($row['info']['info']['job'], $job)==false) continue;
@ -606,6 +609,9 @@ class MarketController extends BaseController {
$rows = array_merge($rows, $this->listMySelledNfts($account, $type));
foreach ($rows as &$row) {
$nftDb = Nft::findNftByOwner($account, $row['token_id']);
if (empty($nftDb)) {
$nftDb = Nft::getNft($row['token_id']);
}
$row['info'] = Nft::toDto($nftDb);
$row['detail'] = Gun::toDtoInfo(Gun::findByTokenId2($row['token_id']));
if ($row['detail']['gun_lv']<$lv) continue;
@ -660,6 +666,9 @@ class MarketController extends BaseController {
$rows = array_merge($rows, $this->listMySelledNfts($account, $type));
foreach ($rows as &$row) {
$nftDb = Nft::findNftByOwner($account, $row['token_id']);
if (empty($nftDb)) {
$nftDb = Nft::getNft($row['token_id']);
}
$row['detail'] = $this->getNftGameData($nftDb);
if (!in_array($row['detail']['type'], $job))
continue;