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
f06e90cb
Commit
f06e90cb
authored
Nov 13, 2020
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/optimize' into 'master'
Feature/optimize See merge request
!415
parents
819aeff9
df83fc59
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
25 deletions
+23
-25
BaseController.php
api/base/BaseController.php
+10
-10
WalletController.php
api/controllers/WalletController.php
+13
-15
No files found.
api/base/BaseController.php
View file @
f06e90cb
...
@@ -78,16 +78,16 @@ class BaseController extends Controller
...
@@ -78,16 +78,16 @@ class BaseController extends Controller
Yii
::
$app
->
request
->
setBodyParams
(
$rawBodyParams
);
Yii
::
$app
->
request
->
setBodyParams
(
$rawBodyParams
);
}
}
}
}
if
(
'ticker'
==
$request_controller
&&
'hot-ticker'
==
$request_action
)
{
//
if ('ticker' == $request_controller && 'hot-ticker' == $request_action) {
$realip
=
Tools
::
getUserIp
();
//
$realip = Tools::getUserIp();
$ip_list
=
file_get_contents
(
'http://172.16.0.230:8080/wallet_interface_ip_limit.txt'
);
//
$ip_list = file_get_contents('http://172.16.0.230:8080/wallet_interface_ip_limit.txt');
$ip_arr
=
explode
(
"
\n
"
,
$ip_list
);
//
$ip_arr = explode("\n", $ip_list);
foreach
(
$ip_arr
as
$key
=>
$ip
)
{
//
foreach ($ip_arr as $key => $ip) {
if
(
$ip
==
$realip
)
{
//
if ($ip == $realip) {
return
false
;
//
return false;
}
//
}
}
//
}
}
//
}
$this
->
start
=
microtime
(
true
);
$this
->
start
=
microtime
(
true
);
return
parent
::
beforeAction
(
$action
);
// TODO: Change the autogenerated stub
return
parent
::
beforeAction
(
$action
);
// TODO: Change the autogenerated stub
...
...
api/controllers/WalletController.php
View file @
f06e90cb
...
@@ -116,29 +116,28 @@ class WalletController extends BaseController
...
@@ -116,29 +116,28 @@ class WalletController extends BaseController
$token
=
Yii
::
$app
->
request
->
get
(
'address'
,
''
);
$token
=
Yii
::
$app
->
request
->
get
(
'address'
,
''
);
$symbol
=
Yii
::
$app
->
request
->
get
(
'symbol'
,
''
);
$symbol
=
Yii
::
$app
->
request
->
get
(
'symbol'
,
''
);
if
(
empty
(
$platform_id
)
||
empty
(
$token
)
||
empty
(
$symbol
))
{
if
(
empty
(
$platform_id
)
||
empty
(
$token
)
||
empty
(
$symbol
))
{
$msg
=
'参数不能为空'
;
$this
->
msg
=
'参数不能为空'
;
$code
=
-
1
;
$this
->
code
=
-
1
;
$data
=
null
;
goto
doEnd
;
goto
doEnd
;
}
}
$chain_model
=
CoinPlatform
::
find
()
->
select
(
'chain_id'
)
->
where
([
'id'
=>
$platform_id
])
->
andWhere
([
'<>'
,
'chain_id'
,
0
])
->
one
();
$chain_model
=
CoinPlatform
::
find
()
->
select
(
'chain_id'
)
->
where
([
'id'
=>
$platform_id
])
->
andWhere
([
'<>'
,
'chain_id'
,
0
])
->
one
();
if
(
empty
(
$chain_model
))
{
if
(
empty
(
$chain_model
))
{
$msg
=
'此功能为付费功能,有兴趣请与销售联系'
;
$
this
->
msg
=
'此功能为付费功能,有兴趣请与销售联系'
;
$code
=
-
1
;
$
this
->
code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
}
}
$platform
=
CoinPlatformWithHold
::
find
()
->
select
(
'exer, platform'
)
->
where
([
'id'
=>
$chain_model
->
chain_id
])
->
one
();
$platform
=
CoinPlatformWithHold
::
find
()
->
select
(
'exer, platform'
)
->
where
([
'id'
=>
$chain_model
->
chain_id
])
->
one
();
if
(
empty
(
$platform
))
{
if
(
empty
(
$platform
))
{
$msg
=
'此功能为付费功能,有兴趣请与销售联系'
;
$
this
->
msg
=
'此功能为付费功能,有兴趣请与销售联系'
;
$code
=
-
1
;
$
this
->
code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
}
}
$node
=
Yii
::
$app
->
params
[
'chain_nodes'
][
strtoupper
(
$platform
->
platform
)];
$node
=
Yii
::
$app
->
params
[
'chain_nodes'
][
strtoupper
(
$platform
->
platform
)]
??
null
;
if
(
empty
(
$node
))
{
if
(
empty
(
$node
))
{
$msg
=
'此功能为付费功能,有兴趣请与销售联系'
;
$
this
->
msg
=
'此功能为付费功能,有兴趣请与销售联系'
;
$code
=
-
1
;
$
this
->
code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
}
}
...
@@ -170,14 +169,13 @@ class WalletController extends BaseController
...
@@ -170,14 +169,13 @@ class WalletController extends BaseController
}
}
if
(
0
!==
$result
[
'code'
])
{
if
(
0
!==
$result
[
'code'
])
{
$msg
=
'当前发币人数过多,请客官稍后再试'
;
$this
->
msg
=
'当前发币人数过多,请客官稍后再试'
;
$code
=
-
1
;
$this
->
code
=
-
1
;
$data
=
null
;
goto
doEnd
;
goto
doEnd
;
}
}
$data
=
$result
[
'result'
];
$
this
->
data
=
$result
[
'result'
];
doEnd
:
doEnd
:
return
[
'code'
=>
$
code
,
'data'
=>
$data
,
'msg'
=>
$
msg
];
return
[
'code'
=>
$
this
->
code
,
'data'
=>
$this
->
data
,
'msg'
=>
$this
->
msg
];
}
}
public
function
actionTransfer
()
public
function
actionTransfer
()
...
...
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