Commit 10a94036 authored by shajiaiming's avatar shajiaiming

支持链增加返回字段

parent 3d72d072
......@@ -30,7 +30,7 @@ class SupportedChainController extends BaseController
foreach ($supported_chain_model as $key => &$val) {
$data[$key]['chain'] = isset($val->coin->chain) ? $val->coin->chain : '';
$data[$key]['icon'] = isset($val->coin->icon) ? $val->coin->icon : '';
$data[$key]['name'] = isset($val->coin->name) ? $val->coin->name : '';
}
$msg = 'success';
$code = 0;
......
......@@ -46,6 +46,6 @@ class CoinSupportedChain extends BaseActiveRecord
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