Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
8808f176
Commit
8808f176
authored
Dec 14, 2018
by
ZhuChunYang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
1cf4e6e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
ExchangeBusiness.php
common/business/ExchangeBusiness.php
+5
-3
CoinController.php
h5/controllers/CoinController.php
+2
-1
No files found.
common/business/ExchangeBusiness.php
View file @
8808f176
...
...
@@ -137,10 +137,12 @@ class ExchangeBusiness
* @param array $condition 需要的币种sid列表
* @return array
*/
public
static
function
getApiListForIndex
(
$page
=
1
,
$limit
=
999
,
$condition
=
[])
public
static
function
getApiListForIndex
(
$page
=
1
,
$limit
=
999
,
$condition
=
[]
,
$fields
=
[]
)
{
$rows
=
Coin
::
getSelectList
(
$page
,
$limit
,
[
'id'
,
'sid'
,
'icon'
,
'name'
,
'nickname'
,
'platform'
,
'chain'
,
'address as contract_address'
],
$condition
);
if
(
!
$fields
)
{
$fields
=
[
'id'
,
'sid'
,
'icon'
,
'name'
,
'nickname'
,
'platform'
,
'chain'
,
'address as contract_address'
];
}
$rows
=
Coin
::
getSelectList
(
$page
,
$limit
,
$fields
,
$condition
);
$count
=
0
;
if
(
!
empty
(
$rows
)
&&
is_array
(
$rows
)
&&
array_key_exists
(
'count'
,
$rows
))
{
$count
=
$rows
[
'count'
];
...
...
h5/controllers/CoinController.php
View file @
8808f176
...
...
@@ -54,7 +54,8 @@ class CoinController extends BaseController
$names
=
[
$names
];
}
$condition
=
[[
'in'
,
'name'
,
$names
]];
$result
=
ExchangeBusiness
::
getApiListForIndex
(
1
,
999
,
$condition
);
$fields
=
[
'id'
,
'sid'
,
'icon'
,
'name'
,
'nickname'
,
'platform'
,
'chain'
,
'address as contract_address'
,
'introduce'
];
$result
=
ExchangeBusiness
::
getApiListForIndex
(
1
,
999
,
$condition
,
$fields
);
if
(
$result
)
{
$response_
->
build
(
ResponseBuild
::
STATUS_SUCCEED
,
''
,
$result
[
'data'
]);
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment