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
8e45efec
Commit
8e45efec
authored
Jan 09, 2020
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/optimize' into 'master'
fix See merge request
!265
parents
df373183
d507c9df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
SupportedSymbolController.php
api/controllers/SupportedSymbolController.php
+10
-4
No files found.
api/controllers/SupportedSymbolController.php
View file @
8e45efec
...
@@ -24,6 +24,12 @@ class SupportedSymbolController extends BaseController
...
@@ -24,6 +24,12 @@ class SupportedSymbolController extends BaseController
}
}
$parentSupportedSymbol
=
CoinSupportedSymbol
::
find
()
->
where
([
'platform_id'
=>
$platform_id
])
->
groupBy
(
'currency'
)
->
all
();
$parentSupportedSymbol
=
CoinSupportedSymbol
::
find
()
->
where
([
'platform_id'
=>
$platform_id
])
->
groupBy
(
'currency'
)
->
all
();
if
(
empty
(
$parentSupportedSymbol
))
{
$msg
=
'success'
;
$code
=
0
;
$market
=
null
;
goto
doEnd
;
}
$market
=
[];
$market
=
[];
foreach
(
$parentSupportedSymbol
as
$val
)
{
foreach
(
$parentSupportedSymbol
as
$val
)
{
$coin_name
[]
=
$val
->
coinInfo
->
name
;
$coin_name
[]
=
$val
->
coinInfo
->
name
;
...
@@ -35,9 +41,9 @@ class SupportedSymbolController extends BaseController
...
@@ -35,9 +41,9 @@ class SupportedSymbolController extends BaseController
$params
=
json_encode
(
$data
);
$params
=
json_encode
(
$data
);
$curl
->
setHeader
(
'Content-Type'
,
'application/json'
);
$curl
->
setHeader
(
'Content-Type'
,
'application/json'
);
$curl
->
setRawPostData
(
$params
);
$curl
->
setRawPostData
(
$params
);
$res
=
$curl
->
post
(
\Yii
::
$app
->
params
[
'biqianbao'
]
.
'/interface/coin/coin-index'
,
true
);
$res
=
$curl
->
post
(
\Yii
::
$app
->
params
[
'biqianbao'
]
.
'/interface/coin/coin-index'
,
true
);
$res
=
json_decode
(
$res
,
true
);
$res
=
json_decode
(
$res
,
true
);
$res
=
array_column
(
$res
[
'data'
],
NULL
,
'id'
);;
$res
=
array_column
(
$res
[
'data'
],
NULL
,
'id'
);;
foreach
(
$parentSupportedSymbol
as
&
$val
)
{
foreach
(
$parentSupportedSymbol
as
&
$val
)
{
$temp
=
[];
$temp
=
[];
...
@@ -67,9 +73,9 @@ class SupportedSymbolController extends BaseController
...
@@ -67,9 +73,9 @@ class SupportedSymbolController extends BaseController
$curl
=
new
Curl
();
$curl
=
new
Curl
();
$curl
->
setHeader
(
'Content-Type'
,
'application/json'
);
$curl
->
setHeader
(
'Content-Type'
,
'application/json'
);
$curl
->
setRawPostData
(
$params
);
$curl
->
setRawPostData
(
$params
);
$res
=
$curl
->
post
(
\Yii
::
$app
->
params
[
'biqianbao'
]
.
'/interface/coin/coin-index'
,
true
);
$res
=
$curl
->
post
(
\Yii
::
$app
->
params
[
'biqianbao'
]
.
'/interface/coin/coin-index'
,
true
);
$res
=
json_decode
(
$res
,
true
);
$res
=
json_decode
(
$res
,
true
);
$res
=
array_column
(
$res
[
'data'
],
NULL
,
'id'
);;
$res
=
array_column
(
$res
[
'data'
],
NULL
,
'id'
);;
foreach
(
$childSupportedSymbol
as
$child
)
{
foreach
(
$childSupportedSymbol
as
$child
)
{
$temp
=
[];
$temp
=
[];
...
...
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