...
This commit is contained in:
parent
5e0364ed73
commit
bac35fac85
@ -582,6 +582,40 @@ class MarketController extends BaseController
|
|||||||
};
|
};
|
||||||
$nfts = array();
|
$nfts = array();
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
|
case Nft::NONE_TYPE: {
|
||||||
|
$rows = Nft::getNftListByType($account, $type);
|
||||||
|
$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;
|
||||||
|
// if ($row['detail']['hero_lv'] < $lv) continue;
|
||||||
|
// if ($row['detail']['quality'] < $quality) continue;
|
||||||
|
// if ($row['detail']['hero_tili'] < $durability) continue;
|
||||||
|
if (count($search) > 0) {
|
||||||
|
$searchLower = array_map('strtolower', $search);
|
||||||
|
if (!(in_array(strtolower($row['detail']['hero_name']), $searchLower) || in_array(strtolower($row['detail']['token_id']), $searchLower))) continue;
|
||||||
|
}
|
||||||
|
// $row['detail'] = $this->appendChipsInfo($row['detail']);
|
||||||
|
array_push($nfts, $row);
|
||||||
|
}
|
||||||
|
switch ($order_method) {
|
||||||
|
case 1:
|
||||||
|
usort($nfts, $sortByLevel);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
usort($nfts, $sortByTili);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
usort($nfts, $sortByStar);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case Nft::HERO_TYPE: {
|
case Nft::HERO_TYPE: {
|
||||||
$rows = Nft::getNftListByType($account, $type);
|
$rows = Nft::getNftListByType($account, $type);
|
||||||
$rows = array_merge($rows, $this->listMySelledNfts($account, $type));
|
$rows = array_merge($rows, $this->listMySelledNfts($account, $type));
|
||||||
@ -845,12 +879,10 @@ class MarketController extends BaseController
|
|||||||
$nftDb = Nft::findNftByOwner('0xfc628dd79137395f3c9744e33b1c5de554d94882', $row['token_id']);
|
$nftDb = Nft::findNftByOwner('0xfc628dd79137395f3c9744e33b1c5de554d94882', $row['token_id']);
|
||||||
if (!$nftDb) {
|
if (!$nftDb) {
|
||||||
if ($row['item_id']) {
|
if ($row['item_id']) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
myself()->_rspErr(1, 'nft not exists');
|
myself()->_rspErr(1, 'nft not exists');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user