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,8 +216,10 @@ class IssueCoinController extends BaseController
$pages = new Pagination(['totalCount' => $countQuery->count(), 'pageSize' => $size]);
foreach ($models as &$val) {
$val->chain_id = $val->chain->platform;
if (0 != $val->token_type) {
$val->total = (int)$val->total * 1e4;
}
}
$data = [
'list' => $models,
'page' => [
......@@ -254,7 +256,9 @@ class IssueCoinController extends BaseController
$code = -1;
goto doEnd;
}
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