Commit 8808f176 authored by ZhuChunYang's avatar ZhuChunYang

update

parent 1cf4e6e3
......@@ -137,10 +137,12 @@ class ExchangeBusiness
* @param array $condition 需要的币种sid列表
* @return array
*/
public static function getApiListForIndex($page = 1, $limit = 999, $condition = [])
public static function getApiListForIndex($page = 1, $limit = 999, $condition = [], $fields=[])
{
$rows = Coin::getSelectList($page, $limit, ['id', 'sid', 'icon', 'name', 'nickname', 'platform', 'chain','address as contract_address'],
$condition);
if(!$fields) {
$fields =['id', 'sid', 'icon', 'name', 'nickname', 'platform', 'chain','address as contract_address'];
}
$rows = Coin::getSelectList($page, $limit, $fields,$condition);
$count = 0;
if (!empty($rows) && is_array($rows) && array_key_exists('count', $rows)) {
$count = $rows['count'];
......
......@@ -54,7 +54,8 @@ class CoinController extends BaseController
$names = [$names];
}
$condition = [['in', 'name', $names]];
$result = ExchangeBusiness::getApiListForIndex(1, 999, $condition);
$fields = ['id', 'sid', 'icon', 'name', 'nickname', 'platform', 'chain','address as contract_address','introduce'];
$result = ExchangeBusiness::getApiListForIndex(1, 999, $condition,$fields);
if ($result) {
$response_->build(ResponseBuild::STATUS_SUCCEED, '', $result['data']);
}else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment