Commit 39b86587 authored by shajiaiming's avatar shajiaiming

币种接口返回数据更新

parent d7817133
......@@ -86,7 +86,7 @@ class WalletCoinController extends BaseController
$ticker = ['low' => 0, 'high' => 0, 'last' => 0, 'open' => 0, 'vol' => 0, 'rmb' => 0, 'usd' => 0];
foreach ($this->data as $key => &$val) {
$val['chain_quotation'] = isset($coin_quotations[strtoupper($val['chain'])]) ? $coin_quotations[strtoupper($val['chain'])] : [];
//$val['chain_quotation'] = isset($coin_quotations[strtoupper($val['chain'])]) ? $coin_quotations[strtoupper($val['chain'])] : [];
$nickname = json_decode($val['nickname'], true);
$val['nickname'] = isset($nickname[$this->lang]) ? $nickname[$this->lang] : '';
$introduce = json_decode($val['introduce'], true);
......@@ -141,14 +141,14 @@ class WalletCoinController extends BaseController
$this->data = $query->offset(($page - 1) * $limit)->limit($limit)->asArray()->all();
if (false != $this->data) {
$chains = array_unique(array_column($this->data, 'chain'));
$chain_quotation = [];
foreach ($chains as $key => $value) {
$chain_quotation[$value] = ExchangeBusiness::getquatation($value);
}
foreach ($this->data as $key => $value) {
$this->data[$key]['chain_quotation'] = $chain_quotation[$value['chain']] ?: null;
}
// $chains = array_unique(array_column($this->data, 'chain'));
// $chain_quotation = [];
// foreach ($chains as $key => $value) {
// $chain_quotation[$value] = ExchangeBusiness::getquatation($value);
// }
// foreach ($this->data as $key => $value) {
// $this->data[$key]['chain_quotation'] = $chain_quotation[$value['chain']] ?: null;
// }
foreach ($this->data as $key => &$value) {
$nickname = json_decode($value['nickname'], true);
$value['nickname'] = isset($nickname[$this->lang]) ? $nickname[$this->lang] : '';
......
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