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
452c240f
Commit
452c240f
authored
May 20, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
托管币种参数
parent
39f44bdd
Show 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 @
452c240f
...
...
@@ -91,9 +91,9 @@ class ServiceController extends BaseController
*/
public
function
actionCoinIndex
()
{
//$request = Yii::$app->request
;
$platform_id
=
Yii
::
$app
->
request
->
get
(
'platform_id'
,
6
)
;
//$coinItems = $request->post('names',[]);
$coin_recommendItems
=
$this
->
coinRecommendList
();
$coin_recommendItems
=
$this
->
coinRecommendList
(
$platform_id
);
$fields
=
[
'id'
,
'sid'
,
'icon'
,
'name'
,
'nickname'
,
'chain'
,
'platform'
];
$rows
=
Coin
::
getSelectList
(
1
,
999
,
$fields
,[[
'in'
,
'id'
,
$coin_recommendItems
]]);
return
[
'code'
=>
0
,
'data'
=>
$rows
,
'msg'
=>
'币种列表获取成功'
];
...
...
@@ -103,9 +103,9 @@ class ServiceController extends BaseController
* @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
){
$coin_ids
=
array_column
(
$recommend_list
,
'cid'
);
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