Commit dcad4dcc authored by shajiaiming's avatar shajiaiming

fix

parent 1ec7187e
......@@ -19,7 +19,7 @@ class RecommendCoinController extends BaseController
goto doEnd;
}
$recommend_coins = RecommendCoin::find()->where(['platform_id' => (int)$platform_id])->all();
$recommend_coins = RecommendCoin::find()->where(['platform_id' => (int)$platform_id])->orderBy("sort desc")->all();
if (empty($recommend_coins)) {
goto doEnd;
}
......@@ -28,7 +28,8 @@ class RecommendCoinController extends BaseController
//$this->data[$coin->coin[0]['chain']] = $coin->coin;
$this->data = array_merge($this->data, $coin->coin);
}
echo json_encode($this->data);exit;
echo json_encode($this->data);
exit;
$chains = array_column($this->data, 'chain');
$symbol = array_column($this->data, 'name');
$name = array_keys(array_flip($chains) + array_flip($symbol));
......
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