Commit f538a9bc authored by ZhuChunYang's avatar ZhuChunYang

首页修改

parent c6bc42f1
......@@ -203,7 +203,24 @@ class CoinController extends BaseController
public function actionCoinIndex()
{
$names = Yii::$app->request->post('names');
$condition = [['in', 'name', $names]];
$platforms = [];
$newNames = [];
if(!$names){
return ['code' => 0,'data' => []];
}
foreach($names as $item){
$item_array = explode(',',$item);
$newNames [] = $item_array[0];
if(isset($item_array[1])){
if(!in_array($item_array[1],$platforms)){
$platforms [] = $item_array[1];
}
}
}
$condition = [['in', 'name', $newNames]];
if($platforms){
$condition[] = ['in', 'platform', $platforms];
}
$result = ExchangeBusiness::getApiListForIndex(1, 999, $condition);
if ($result) {
$chains = array_unique(array_column($result['data'], 'chain'));
......
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