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
9d7aa110
Commit
9d7aa110
authored
Feb 12, 2020
by
shajiaming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a15680b8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
1 deletion
+56
-1
CoinController.php
api/controllers/CoinController.php
+5
-1
WalletController.php
api/controllers/WalletController.php
+30
-0
WalletSupportedTokenCategory.php
common/models/psources/WalletSupportedTokenCategory.php
+21
-0
No files found.
api/controllers/CoinController.php
View file @
9d7aa110
...
@@ -128,11 +128,15 @@ class CoinController extends BaseController
...
@@ -128,11 +128,15 @@ class CoinController extends BaseController
$limit
=
$request
->
post
(
'limit'
,
999
);
$limit
=
$request
->
post
(
'limit'
,
999
);
$platform_id
=
$request
->
post
(
'platform_id'
,
1
);
//默认币钱包
$platform_id
=
$request
->
post
(
'platform_id'
,
1
);
//默认币钱包
$recommend
=
$request
->
post
(
'recommend'
,
''
);
$recommend
=
$request
->
post
(
'recommend'
,
''
);
$chain
=
$request
->
post
(
'chain'
,
''
);
$condition
=
[
'platform_id'
=>
$platform_id
,
'type'
=>
1
];
$condition
=
[
'platform_id'
=>
$platform_id
,
'type'
=>
1
];
if
(
$recommend
)
{
if
(
$recommend
)
{
$condition
[
'recommend'
]
=
$recommend
;
$condition
[
'recommend'
]
=
$recommend
;
}
}
if
(
$chain
)
{
$condition
[
'chain'
]
=
$chain
;
}
$select
=
[
'id'
,
'sid'
,
'icon'
,
'name'
,
'introduce'
,
'optional_name'
,
'nickname'
,
'platform'
,
'chain'
,
'treaty'
];
$select
=
[
'id'
,
'sid'
,
'icon'
,
'name'
,
'introduce'
,
'optional_name'
,
'nickname'
,
'platform'
,
'chain'
,
'treaty'
];
$order_by
=
[
'sort'
=>
SORT_ASC
];
$order_by
=
[
'sort'
=>
SORT_ASC
];
$datas
=
CoinRecommend
::
getList
(
$page
,
$limit
,
$condition
,
$order_by
,
$select
);
$datas
=
CoinRecommend
::
getList
(
$page
,
$limit
,
$condition
,
$order_by
,
$select
);
...
...
api/controllers/WalletController.php
View file @
9d7aa110
...
@@ -8,12 +8,42 @@ use common\models\psources\CoinAirDropTrade;
...
@@ -8,12 +8,42 @@ use common\models\psources\CoinAirDropTrade;
use
common\models\psources\CoinIssueTransfer
;
use
common\models\psources\CoinIssueTransfer
;
use
common\models\psources\CoinPlatform
;
use
common\models\psources\CoinPlatform
;
use
common\models\psources\CoinPlatformWithHold
;
use
common\models\psources\CoinPlatformWithHold
;
use
common\models\psources\WalletSupportedTokenCategory
;
use
common\service\chain33\Chain33Service
;
use
common\service\chain33\Chain33Service
;
use
Yii
;
use
Yii
;
class
WalletController
extends
BaseController
class
WalletController
extends
BaseController
{
{
public
function
actionTokenCategory
()
{
$header
=
Yii
::
$app
->
request
->
headers
;
$platform_id
=
$header
[
'FZM-PLATFORM-ID'
]
??
null
;
if
(
empty
(
$platform_id
))
{
$this
->
msg
=
'缺少必要参数'
;
$this
->
code
=
-
1
;
goto
doEnd
;
}
$this
->
data
=
[
[
'category'
=>
'首页'
,
'chain'
=>
null
],
[
'category'
=>
'首页'
,
'chain'
=>
null
]
];
$data
=
WalletSupportedTokenCategory
::
find
()
->
select
(
'category, chain'
)
->
where
([
'platform_id'
=>
(
int
)
$platform_id
])
->
asArray
()
->
all
();
if
(
empty
(
$data
))
{
goto
doEnd
;
}
$this
->
data
=
array_merge
(
$this
->
data
,
$data
);
doEnd
:
return
[
'code'
=>
$this
->
code
,
'data'
=>
$this
->
data
,
'msg'
=>
$this
->
msg
];
}
public
function
actionInfo
()
public
function
actionInfo
()
{
{
$code
=
0
;
$code
=
0
;
...
...
common/models/psources/WalletSupportedTokenCategory.php
0 → 100644
View file @
9d7aa110
<?php
namespace
common\models\psources
;
use
Yii
;
use
common\core\BaseActiveRecord
;
class
WalletSupportedTokenCategory
extends
BaseActiveRecord
{
public
static
function
getDb
()
{
return
Yii
::
$app
->
get
(
'p_sources'
);
}
public
static
function
tableName
()
{
return
'{{wallet_supported_token_catetory}}'
;
}
}
\ No newline at end of file
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