Commit 0c648d3a authored by rlgy's avatar rlgy

添加平台信息

parent e00df676
...@@ -76,6 +76,21 @@ class CoinBusiness ...@@ -76,6 +76,21 @@ class CoinBusiness
if ($rows['count'] > 0) { if ($rows['count'] > 0) {
$rows = $rows['data']; $rows = $rows['data'];
foreach ($rows as $key => $value) { foreach ($rows as $key => $value) {
if (empty($value['publish_count'])) {
$rows[$key]['publish_count'] = 0;
}
if (empty($value['circulate_count'])) {
$rows[$key]['circulate_count'] = 0;
}
if (empty($value['release'])) {
$rows[$key]['release'] = '';
}
if (empty($value['sid'])) {
$rows[$key]['sid'] = '';
}
if (empty($value['introduce'])) {
$rows[$key]['introduce'] = '';
}
$coin = CoinFactory::createCoin($value['name'], $value['id'], $value['sid']); $coin = CoinFactory::createCoin($value['name'], $value['id'], $value['sid']);
$rows[$key]['quotation'] = $coin->quotation(); $rows[$key]['quotation'] = $coin->quotation();
$coin->__destruct(); $coin->__destruct();
...@@ -91,7 +106,7 @@ class CoinBusiness ...@@ -91,7 +106,7 @@ class CoinBusiness
*/ */
public static function getApiListForIndex($condition = []) public static function getApiListForIndex($condition = [])
{ {
$rows = Coin::getSelectList(1, 999, ['id', 'sid', 'icon', 'name', 'nickname', 'chain'], $condition); $rows = Coin::getSelectList(1, 999, ['id', 'sid', 'icon', 'name', 'nickname', 'platform', 'chain'], $condition);
if ($rows['count'] > 0) { if ($rows['count'] > 0) {
$rows = $rows['data']; $rows = $rows['data'];
foreach ($rows as $key => $row) { foreach ($rows as $key => $row) {
...@@ -115,7 +130,7 @@ class CoinBusiness ...@@ -115,7 +130,7 @@ class CoinBusiness
*/ */
public static function SearchByName($page = 1, $limit = 10, $condition = []) public static function SearchByName($page = 1, $limit = 10, $condition = [])
{ {
$rows = Coin::getSelectList($page, $limit, ['id', 'sid', 'icon', 'name', 'nickname', 'chain'], $condition); $rows = Coin::getSelectList($page, $limit, ['id', 'sid', 'icon', 'name', 'nickname', 'platform', 'chain'], $condition);
if ($rows['count'] > 0) { if ($rows['count'] > 0) {
$rows = $rows['data']; $rows = $rows['data'];
foreach ($rows as $key => $row) { foreach ($rows as $key => $row) {
......
...@@ -120,7 +120,7 @@ class ExchangeBusiness ...@@ -120,7 +120,7 @@ class ExchangeBusiness
*/ */
public static function getApiListForIndex($condition = []) public static function getApiListForIndex($condition = [])
{ {
$rows = Coin::getSelectList(1, 999, ['id', 'sid', 'icon', 'name', 'nickname', 'chain'], $condition); $rows = Coin::getSelectList(1, 999, ['id', 'sid', 'icon', 'name', 'nickname', 'platform', 'chain'], $condition);
if ($rows['count'] > 0) { if ($rows['count'] > 0) {
$rows = $rows['data']; $rows = $rows['data'];
foreach ($rows as $key => $row) { foreach ($rows as $key => $row) {
...@@ -161,7 +161,7 @@ class ExchangeBusiness ...@@ -161,7 +161,7 @@ class ExchangeBusiness
*/ */
public static function SearchByName($page = 1, $limit = 10, $condition = []) public static function SearchByName($page = 1, $limit = 10, $condition = [])
{ {
$rows = Coin::getSelectList($page, $limit, ['id', 'sid', 'icon', 'name', 'nickname', 'chain'], $condition); $rows = Coin::getSelectList($page, $limit, ['id', 'sid', 'icon', 'name', 'nickname', 'platform', 'chain'], $condition);
if ($rows['count'] > 0) { if ($rows['count'] > 0) {
$rows = $rows['data']; $rows = $rows['data'];
foreach ($rows as $key => $row) { foreach ($rows as $key => $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