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
2478466f
Commit
2478466f
authored
Aug 02, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5de0d4d1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
CoinController.php
api/controllers/CoinController.php
+1
-0
ExchangeBusiness.php
common/business/ExchangeBusiness.php
+7
-0
No files found.
api/controllers/CoinController.php
View file @
2478466f
...
@@ -228,6 +228,7 @@ class CoinController extends BaseController
...
@@ -228,6 +228,7 @@ class CoinController extends BaseController
$condition
[]
=
[
$val_array
[
0
],
$val_array
[
1
]];
$condition
[]
=
[
$val_array
[
0
],
$val_array
[
1
]];
}
}
$result
=
ExchangeBusiness
::
getApiListForIndex
(
1
,
999
,
$condition
);
$result
=
ExchangeBusiness
::
getApiListForIndex
(
1
,
999
,
$condition
);
var_dump
(
$result
);
exit
;
if
(
$result
)
{
if
(
$result
)
{
$chains
=
array_unique
(
array_column
(
$result
[
'data'
],
'chain'
));
$chains
=
array_unique
(
array_column
(
$result
[
'data'
],
'chain'
));
$chain_quotation
=
[];
$chain_quotation
=
[];
...
...
common/business/ExchangeBusiness.php
View file @
2478466f
...
@@ -261,6 +261,13 @@ class ExchangeBusiness
...
@@ -261,6 +261,13 @@ class ExchangeBusiness
public
static
function
getApiListForIndex
(
$page
=
1
,
$limit
=
999
,
$condition
=
[],
$fields
=
[])
public
static
function
getApiListForIndex
(
$page
=
1
,
$limit
=
999
,
$condition
=
[],
$fields
=
[])
{
{
foreach
(
$condition
as
$val
)
{
foreach
(
$condition
as
$val
)
{
if
(
$val
[
1
]
==
'null'
){
$data
[]
=
Coin
::
find
()
->
select
(
'id,sid,icon,name,optional_name,nickname,platform,chain,address as contract_address,treaty'
)
->
where
([
'name'
=>
$val
[
0
]])
->
asArray
()
->
one
();
continue
;
}
$data
[]
=
Coin
::
find
()
->
select
(
'id,sid,icon,name,optional_name,nickname,platform,chain,address as contract_address,treaty'
)
$data
[]
=
Coin
::
find
()
->
select
(
'id,sid,icon,name,optional_name,nickname,platform,chain,address as contract_address,treaty'
)
->
where
([
'name'
=>
$val
[
0
]])
->
where
([
'name'
=>
$val
[
0
]])
->
andWhere
([
'platform'
=>
$val
[
1
]])
->
andWhere
([
'platform'
=>
$val
[
1
]])
...
...
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