Commit 8e45efec authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/optimize' into 'master'

fix See merge request !265
parents df373183 d507c9df
......@@ -24,6 +24,12 @@ class SupportedSymbolController extends BaseController
}
$parentSupportedSymbol = CoinSupportedSymbol::find()->where(['platform_id' => $platform_id])->groupBy('currency')->all();
if (empty($parentSupportedSymbol)) {
$msg = 'success';
$code = 0;
$market = null;
goto doEnd;
}
$market = [];
foreach ($parentSupportedSymbol as $val) {
$coin_name[] = $val->coinInfo->name;
......@@ -35,9 +41,9 @@ class SupportedSymbolController extends BaseController
$params = json_encode($data);
$curl->setHeader('Content-Type', 'application/json');
$curl->setRawPostData($params);
$res = $curl->post(\Yii::$app->params['biqianbao'].'/interface/coin/coin-index', true);
$res = $curl->post(\Yii::$app->params['biqianbao'] . '/interface/coin/coin-index', true);
$res = json_decode($res, true);
$res = array_column($res['data'],NULL,'id');;
$res = array_column($res['data'], NULL, 'id');;
foreach ($parentSupportedSymbol as &$val) {
$temp = [];
......@@ -67,9 +73,9 @@ class SupportedSymbolController extends BaseController
$curl = new Curl();
$curl->setHeader('Content-Type', 'application/json');
$curl->setRawPostData($params);
$res = $curl->post(\Yii::$app->params['biqianbao'].'/interface/coin/coin-index', true);
$res = $curl->post(\Yii::$app->params['biqianbao'] . '/interface/coin/coin-index', true);
$res = json_decode($res, true);
$res = array_column($res['data'],NULL,'id');;
$res = array_column($res['data'], NULL, 'id');;
foreach ($childSupportedSymbol as $child) {
$temp = [];
......
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