Commit 88a0a0b8 authored by shajiaming's avatar shajiaming

fix

parents b75921b9 396683b2
......@@ -206,7 +206,7 @@ class IssueCoinController extends BaseController
$size = \Yii::$app->request->get('size', 5);
$query = CoinIssueCoin::find()
->select('id, name, symbol, type, total, create_time, status, chain_id')
->select('id, name, symbol, type, total, create_time, status, chain_id, token_type')
->where(['owner' => $address])
->andWhere(['in', 'status', [CoinIssueCoin::STATUS_PEDDING, CoinIssueCoin::STATUS_CANCEL_SUCCESS, CoinIssueCoin::STATUS_CANCEL_FAILED, CoinIssueCoin::STATUS_CONFIRM, CoinIssueCoin::STATUS_ALLOW, CoinIssueCoin::STATUS_REFUSE, CoinIssueCoin::STATUS_SUCCESS, CoinIssueCoin::STATUS_FAILED]])
->orderBy('create_time desc');
......@@ -216,7 +216,9 @@ class IssueCoinController extends BaseController
$pages = new Pagination(['totalCount' => $countQuery->count(), 'pageSize' => $size]);
foreach ($models as &$val) {
$val->chain_id = $val->chain->platform;
$val->total = (int)$val->total * 1e4;
if (0 != $val->token_type) {
$val->total = (int)$val->total * 1e4;
}
}
$data = [
'list' => $models,
......@@ -254,7 +256,9 @@ class IssueCoinController extends BaseController
$code = -1;
goto doEnd;
}
$data->total = (int)$data->total * 1e4;
if (0 != $data->token_type) {
$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 : null;
......
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