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
f6fa15ea
Commit
f6fa15ea
authored
Dec 31, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/optimize' into 'master'
Feature/optimize See merge request
!258
parents
b0dd993c
f4878f37
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
2 deletions
+56
-2
SupportedSymbolController.php
api/controllers/SupportedSymbolController.php
+2
-2
TrusteeShipService.php
common/service/trusteeship/TrusteeShipService.php
+7
-0
FlashController.php
wallet/controllers/FlashController.php
+47
-0
No files found.
api/controllers/SupportedSymbolController.php
View file @
f6fa15ea
...
...
@@ -13,9 +13,9 @@ use yii\helpers\ArrayHelper;
class
SupportedSymbolController
extends
BaseController
{
public
function
action
Index
()
public
function
action
Search
()
{
$platform_id
=
Yii
::
$app
->
request
->
get
(
'
platform_
id'
,
''
);
$platform_id
=
Yii
::
$app
->
request
->
get
(
'id'
,
''
);
if
(
empty
(
$platform_id
))
{
$msg
=
'参数不能为空'
;
$code
=
-
1
;
...
...
common/service/trusteeship/TrusteeShipService.php
View file @
f6fa15ea
...
...
@@ -113,6 +113,13 @@ class TrusteeShipService
return
$this
->
send
(
"POST"
,
$uri
,
$params
);
}
public
function
coinList
(
$params
=
[])
{
$uri
=
'/backend/coin/coin-list'
;
return
$this
->
send
(
"GET"
,
$uri
,
$params
);
}
public
function
getUserAsset
(
$params
=
[])
{
$uri
=
'backend/user/asset'
;
...
...
wallet/controllers/FlashController.php
View file @
f6fa15ea
...
...
@@ -301,4 +301,50 @@ class FlashController extends BaseController
return
[
'code'
=>
$code
,
'msg'
=>
$msg
,
'data'
=>
$data
];
}
function
actionIndex
()
{
$msg
=
'success'
;
$code
=
0
;
$data
=
null
;
$group
=
Yii
::
$app
->
request
->
getGroup
();
$platform_id
=
Yii
::
$app
->
request
->
get
(
'platform_id'
,
0
);
if
(
User
::
AUTH_SUPER
!==
$group
&&
$platform_id
!=
Yii
::
$app
->
request
->
getPlatformId
())
{
$msg
=
'暂无权限'
;
$code
=
-
1
;
goto
doEnd
;
}
if
(
!
isset
(
Yii
::
$app
->
params
[
'trusteeship'
][
'node_'
.
$platform_id
]))
{
return
[
'code'
=>
-
1
,
'data'
=>
[],
'msg'
=>
'此钱包节点尚未开通'
];
}
$node_params
=
Yii
::
$app
->
params
[
'trusteeship'
][
'node_'
.
$platform_id
];
$params
=
[];
$time
=
time
();
$appKey
=
isset
(
$node_params
[
'appKey'
])
?
$node_params
[
'appKey'
]
:
null
;
$appSecret
=
isset
(
$node_params
[
'appSecret'
])
?
$node_params
[
'appSecret'
]
:
null
;
$signature
=
self
::
getSign
(
$params
,
$appKey
,
$appSecret
,
$time
);
$headers
=
[
'FZM-Wallet-Signature'
=>
$signature
,
'FZM-Wallet-Timestamp'
=>
$time
,
'FZM-Wallet-AppKey'
=>
$appKey
,
'FZM-Wallet-AppIp'
=>
Yii
::
$app
->
request
->
userIP
];
$service
=
new
TrusteeShipService
(
$node_params
,
$headers
);
$result
=
$service
->
coinList
(
$params
);
if
(
200
!==
$result
[
'code'
])
{
$msg
=
$result
[
'msg'
];
$code
=
-
1
;
goto
doEnd
;
}
$data
=
$result
[
'msg'
];
doEnd
:
return
[
'code'
=>
$code
,
'msg'
=>
$msg
,
'data'
=>
$data
];
}
}
\ 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