Commit b75921b9 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/issue_coin' into develop

parents 6afbbba0 b8b94f03
......@@ -257,7 +257,8 @@ class IssueCoinController extends BaseController
$data->total = (int)$data->total * 1e4;
$data->chain_name = $data->chain->platform;
$data->issue_charge = rtrim(sprintf('%.3f', floatval($data->charge)), '0');
$data->template = isset($data->templated->template) ? $data->templated->template : [];
$data->template = isset($data->templated->template) ? $data->templated->template : null;
$data->origin = isset($data->templated->origin) ? $data->templated->origin : null;
$code = 0;
$msg = 'success';
if (CoinIssueCoin::STATUS_FAILED == $data->status) {
......
......@@ -184,7 +184,7 @@ class CoinIssueCoin extends CommonActiveRecord
public function attributes()
{
return array_merge(parent::attributes(), ['issue_charge', 'url', 'chain_name', 'template']);
return array_merge(parent::attributes(), ['issue_charge', 'url', 'chain_name', 'template', 'origin']);
}
public function getChain()
......@@ -209,6 +209,6 @@ class CoinIssueCoin extends CommonActiveRecord
public function getTemplated()
{
return $this->hasOne(CoinIssueAttachment::className(), ['issue_coin_id' => 'id'])->select('template');
return $this->hasOne(CoinIssueAttachment::className(), ['issue_coin_id' => 'id'])->select('template, origin');
}
}
\ No newline at end of file
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