Commit 1231c593 authored by rlgy's avatar rlgy

接口数据格式修改

parent 08229a37
......@@ -70,7 +70,10 @@ class CoinController extends BaseController
//如果coin为null,$coin->minerFee会抛出Trying to get property 'minerFee' of non-object",code=>8
throw new Exception('8', '币种不存在');
}
return (array)$miner_fee->getAttributes();
$result = (array)$miner_fee->getAttributes();
$result['min']=(float)$result['min'];
$result['max']=(float)$result['max'];
return $result;
}
/**
......
......@@ -145,9 +145,18 @@ class CoinBusiness
if (empty($row['circulate_count'])) {
$row['circulate_count'] = 0;
}
$coin = CoinFactory::createCoin($row['name'], $row['id'], $row['sid']);
$row['quotation'] = $coin->quotation();
$row['exchange_count'] = $coin->exchange_count();
if (empty($row['release'])) {
$row['release'] = '';
}
if (empty($row['sid'])) {
$row['sid'] = '';
}
if (empty($row['introduce'])) {
$row['introduce'] = '';
}
$coin = CoinFactory::createCoin($row['name'], $row['id'], $row['sid']);
$row['quotation'] = $coin->quotation();
$row['exchange_count'] = $coin->exchange_count();
$coin->__destruct();
}
return $row ? [$row] : [];
......
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