From b8ccf35460ea7ab338ede4cbb3dc2d1540e94076 Mon Sep 17 00:00:00 2001 From: songliang Date: Tue, 6 Dec 2022 10:20:30 +0800 Subject: [PATCH] ... --- webapp/controller/MarketController.class.php | 42 +++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/webapp/controller/MarketController.class.php b/webapp/controller/MarketController.class.php index 531669e9..b745d2c8 100644 --- a/webapp/controller/MarketController.class.php +++ b/webapp/controller/MarketController.class.php @@ -551,7 +551,47 @@ class MarketController extends BaseController { $price_filter = getReqVal('price_filter', ''); $price_filter_array = explode('|', $price_filter); - echo $price_filter_array; + $conn = myself()->_getMysql(''); + + $rows = SqlHelper::ormSelect( + $conn, + 't_market_store' + ); + + $nfts = array(); + foreach ($rows as $row) { + $nftDb = Nft::getNft($row['token_id']); + if (!$nftDb) { + myself()->_rspErr(1, 'nft not exists'); + return; + } + $nft = Nft::toDto($nftDb); + + $t = $row['token_type']; + switch($t) { + case Nft::HERO_TYPE: { + + } break; + case Nft::EQUIP_TYPE: { + + } break; + case Nft::CHIP_TYPE: { + + } break; + default: { + + } + } + $row['details'] = $nft; + array_push($nfts, $row); + } + + $this->_rspData(array( + "total" => 1000, + "start" => $start, + "page_size" => $page_size, + 'nfts' => $nfts, + )); }