This commit is contained in:
aozhiwei 2023-08-07 09:31:21 +08:00
parent 2c55658e06
commit 85addb0f8a

View File

@ -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;
}
}