Commit 9433f4f8 authored by rlgy's avatar rlgy

update

parent bf9f9824
...@@ -48,7 +48,7 @@ class CoinController extends BaseController ...@@ -48,7 +48,7 @@ class CoinController extends BaseController
$request = Yii::$app->request; $request = Yii::$app->request;
$page = $request->post('page', 1); $page = $request->post('page', 1);
$limit = $request->post('limit', 999); $limit = $request->post('limit', 999);
$condition = [['recommend' => '1']]; $condition = [['>', 'recommend', '0']];
$result = ExchangeBusiness::getApiListForIndex($page, $limit, $condition); $result = ExchangeBusiness::getApiListForIndex($page, $limit, $condition);
if ($result) { if ($result) {
$chains = array_unique(array_column($result['data'], 'chain')); $chains = array_unique(array_column($result['data'], 'chain'));
......
...@@ -121,7 +121,7 @@ class ExchangeBusiness ...@@ -121,7 +121,7 @@ class ExchangeBusiness
*/ */
public static function getApiListForIndex($page = 1, $limit = 999, $condition = []) public static function getApiListForIndex($page = 1, $limit = 999, $condition = [])
{ {
$rows = Coin::getSelectList($page, $limit, ['id', 'sid', 'icon', 'name', 'nickname', 'platform', 'chain'], $rows = Coin::getSelectList($page, $limit, ['id', 'sid', 'icon', 'name', 'nickname', 'platform', 'chain', 'recommend'],
$condition); $condition);
$count = 0; $count = 0;
if (!empty($rows) && is_array($rows) && array_key_exists('count', $rows)) { if (!empty($rows) && is_array($rows) && array_key_exists('count', $rows)) {
...@@ -167,7 +167,7 @@ class ExchangeBusiness ...@@ -167,7 +167,7 @@ class ExchangeBusiness
*/ */
public static function SearchByName($page = 1, $limit = 10, $condition = []) public static function SearchByName($page = 1, $limit = 10, $condition = [])
{ {
$rows = Coin::getSelectList($page, $limit, ['id', 'sid', 'icon', 'name', 'nickname', 'platform', 'chain'], $rows = Coin::getSelectList($page, $limit, ['id', 'sid', 'icon', 'name', 'nickname', 'platform', 'chain', 'recommend'],
$condition); $condition);
if ($rows['count'] > 0) { if ($rows['count'] > 0) {
$total = $rows['count']; $total = $rows['count'];
......
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