Commit 1cec1030 authored by rlgy's avatar rlgy

币种搜索

parent b0cf3615
......@@ -140,5 +140,17 @@ class CoinController extends BaseController
Yii::$app->response->data = CoinBusiness::getApiListForIndex($condition);
}
public function actionSearchCoinByName()
{
$request = Yii::$app->request;
$name = $request->post('name', '');
$page = $request->post('page', 1);
$limit = $request->post('limit', 10);
if ($name) {
$condition = [['or', ['like', 'name', $name], ['like', 'nickname', $name]]];
$row = Coin::getSelectList($page, $limit, ['id', 'sid', 'icon', 'name', 'nickname', 'chain'],
$condition);
return $row;
}
}
}
\ No newline at end of file
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