diff --git a/webapp/controller/MarketController.class.php b/webapp/controller/MarketController.class.php index 597609f3..ca9b253a 100644 --- a/webapp/controller/MarketController.class.php +++ b/webapp/controller/MarketController.class.php @@ -33,7 +33,9 @@ class MarketController extends BaseAuthedController { $page = getReqVal('page', 1); $queryData = array(); - $pagination = array(); + $out = array( + 'pagination' => array() + ); SqlHelper::rawQueryPage( myself()->_getMySql(''), 'SELECT * FROM t_market WHERE activated=:activated', @@ -116,11 +118,12 @@ class MarketController extends BaseAuthedController { ), //'orderBy' => $orderBy, 'handle' => function ($row) { - $this->fillNftIntro($row); + array_push($out['rows'], $this->fillNftIntro($row)); } ), - $pagination + $out['pagination'] ); + myself()->_rspData($out); } public function listMyNfts() @@ -195,7 +198,18 @@ class MarketController extends BaseAuthedController { } private function fillNftIntro($row) { - + $info = array( + 'order_id' => $row['order_id'], + 'token_id' => $row['token_id'], + 'nft_token' => $row['nft_token'], + 'amount' => $row['amount'], + 'seller' => $row['seller'], + 'currency' => $row['currency'], + 'price' => $row['price'], + 'createtime' => $row['createtime'], + 'updatetime' => $row['createtime'], + ); + return $info; } }