Commit 2478466f authored by shajiaiming's avatar shajiaiming

fix

parent 5de0d4d1
......@@ -228,6 +228,7 @@ class CoinController extends BaseController
$condition[] = [$val_array[0], $val_array[1]];
}
$result = ExchangeBusiness::getApiListForIndex(1, 999, $condition);
var_dump($result);exit;
if ($result) {
$chains = array_unique(array_column($result['data'], 'chain'));
$chain_quotation = [];
......
......@@ -261,6 +261,13 @@ class ExchangeBusiness
public static function getApiListForIndex($page = 1, $limit = 999, $condition = [], $fields = [])
{
foreach ($condition as $val) {
if($val[1] == 'null'){
$data[] = Coin::find()->select('id,sid,icon,name,optional_name,nickname,platform,chain,address as contract_address,treaty')
->where(['name' => $val[0]])
->asArray()
->one();
continue;
}
$data[] = Coin::find()->select('id,sid,icon,name,optional_name,nickname,platform,chain,address as contract_address,treaty')
->where(['name' => $val[0]])
->andWhere(['platform' => $val[1]])
......
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