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
21a718a9
Commit
21a718a9
authored
May 22, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/trade-node' into 'master'
托管币种参数 See merge request
!18
parents
5dbb1273
452c240f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ServiceController.php
api/controllers/ServiceController.php
+4
-4
No files found.
api/controllers/ServiceController.php
View file @
21a718a9
...
@@ -91,9 +91,9 @@ class ServiceController extends BaseController
...
@@ -91,9 +91,9 @@ class ServiceController extends BaseController
*/
*/
public
function
actionCoinIndex
()
public
function
actionCoinIndex
()
{
{
//$request = Yii::$app->request
;
$platform_id
=
Yii
::
$app
->
request
->
get
(
'platform_id'
,
6
)
;
//$coinItems = $request->post('names',[]);
//$coinItems = $request->post('names',[]);
$coin_recommendItems
=
$this
->
coinRecommendList
();
$coin_recommendItems
=
$this
->
coinRecommendList
(
$platform_id
);
$fields
=
[
'id'
,
'sid'
,
'icon'
,
'name'
,
'nickname'
,
'chain'
,
'platform'
];
$fields
=
[
'id'
,
'sid'
,
'icon'
,
'name'
,
'nickname'
,
'chain'
,
'platform'
];
$rows
=
Coin
::
getSelectList
(
1
,
999
,
$fields
,[[
'in'
,
'id'
,
$coin_recommendItems
]]);
$rows
=
Coin
::
getSelectList
(
1
,
999
,
$fields
,[[
'in'
,
'id'
,
$coin_recommendItems
]]);
return
[
'code'
=>
0
,
'data'
=>
$rows
,
'msg'
=>
'币种列表获取成功'
];
return
[
'code'
=>
0
,
'data'
=>
$rows
,
'msg'
=>
'币种列表获取成功'
];
...
@@ -103,9 +103,9 @@ class ServiceController extends BaseController
...
@@ -103,9 +103,9 @@ class ServiceController extends BaseController
* @return array
* @return array
* 托管钱包推荐币种
* 托管钱包推荐币种
*/
*/
private
function
coinRecommendList
()
private
function
coinRecommendList
(
$platform_id
)
{
{
$recommend_list
=
CoinRecommend
::
find
()
->
select
(
'cid'
)
->
where
([
'platform_id'
=>
6
])
->
all
();
$recommend_list
=
CoinRecommend
::
find
()
->
select
(
'cid'
)
->
where
([
'platform_id'
=>
$platform_id
])
->
all
();
if
(
$recommend_list
){
if
(
$recommend_list
){
$coin_ids
=
array_column
(
$recommend_list
,
'cid'
);
$coin_ids
=
array_column
(
$recommend_list
,
'cid'
);
return
$coin_ids
;
return
$coin_ids
;
...
...
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