Commit c9cd3a3b authored by rlgy's avatar rlgy

update

parent 9433f4f8
......@@ -119,13 +119,24 @@ class CoinController extends BaseController
$name = $request->post('name', '');
$page = $request->post('page', 1);
$limit = $request->post('limit', 10);
$platform_ids = $request->post('platform_id', null);
$condition = [['!=', 'chain', 'other']];
if (!empty($name)) {
$condition[] = ['or', ['like', 'name', $name], ['like', 'nickname', $name]];
}
if ($platform_ids) {
$platform_id_arr = explode(',', $platform_ids);
$condition_arr = ['OR'];
foreach ($platform_id_arr as $key => $value) {
array_push($condition_arr, ['=', 'platform_id', $value]);
}
$condition[] = $condition_arr;
}
$result = ExchangeBusiness::SearchByName($page, $limit, $condition);
if (empty($result)) {
return [];
}
$total = $result['total'];
$result = $result['data'];
if ($result) {
......
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