Commit 6dfc7503 authored by shajiaiming's avatar shajiaiming

fix

parent ed39f207
......@@ -245,7 +245,7 @@ class IssueCoinController extends BaseController
$data = CoinIssueCoin::find()->where(['id' => $id])->one();
$data->total = (int)$data->total * 1e8;
$data->chain_name = $data->chain->platform;
$data->charge = isset($data->platform->issue_charge) ? (int)$data->platform->issue_charge : 0;
$data->issue_charge = rtrim(sprintf('%.3f', floatval($data->charge)),'0');
$data->charge_unit = isset($data->gas->coin_name) ? $data->gas->coin_name : '';
$code = 0;
$msg = 'success';
......
......@@ -139,7 +139,7 @@ class CoinIssueCoin extends CommonActiveRecord
public function attributes()
{
return array_merge(parent::attributes(), ['charge', 'charge_unit', 'url', 'chain_name']);
return array_merge(parent::attributes(), ['issue_charge', 'charge_unit', 'url', 'chain_name']);
}
/**
......
......@@ -94,7 +94,7 @@ class IssueCoinController extends BaseController
$data = CoinIssueCoin::find()->where(['id' => $id])->one();
$platform = isset($data->chain->platform) ? $data->chain->platform : '';
$data->total = (int)$data->total * 1e8;
$data->charge = isset($data->platform->issue_charge) ? (int)$data->platform->issue_charge : 0;
$data->issue_charge = rtrim(sprintf('%.3f', floatval($data->charge)),'0');
$data->charge_unit = isset($data->gas->coin_name) ? $data->gas->coin_name : '';
$data->url = Yii::$app->redis->hget('platform_brower_info', $platform);
$code = 0;
......
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