Commit d507c9df authored by shajiaiming's avatar shajiaiming

fix

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