Commit 68416be3 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/optimize' into 'master'

支持链增加返回字段 See merge request !255
parents 3d72d072 10a94036
...@@ -30,7 +30,7 @@ class SupportedChainController extends BaseController ...@@ -30,7 +30,7 @@ class SupportedChainController extends BaseController
foreach ($supported_chain_model as $key => &$val) { foreach ($supported_chain_model as $key => &$val) {
$data[$key]['chain'] = isset($val->coin->chain) ? $val->coin->chain : ''; $data[$key]['chain'] = isset($val->coin->chain) ? $val->coin->chain : '';
$data[$key]['icon'] = isset($val->coin->icon) ? $val->coin->icon : ''; $data[$key]['icon'] = isset($val->coin->icon) ? $val->coin->icon : '';
$data[$key]['name'] = isset($val->coin->name) ? $val->coin->name : '';
} }
$msg = 'success'; $msg = 'success';
$code = 0; $code = 0;
......
...@@ -46,6 +46,6 @@ class CoinSupportedChain extends BaseActiveRecord ...@@ -46,6 +46,6 @@ class CoinSupportedChain extends BaseActiveRecord
public function getCoin() public function getCoin()
{ {
return $this->hasOne(Coin::className(), ['id' => 'coin_id'])->select('name as chain, icon'); return $this->hasOne(Coin::className(), ['id' => 'coin_id'])->select('name, chain, icon');
} }
} }
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