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
a45e02cc
Commit
a45e02cc
authored
Oct 25, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复已知问题
parent
3d2f449f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
WalletController.php
api/controllers/WalletController.php
+6
-6
IssueCoinController.php
console/controllers/IssueCoinController.php
+4
-2
No files found.
api/controllers/WalletController.php
View file @
a45e02cc
...
@@ -80,16 +80,16 @@ class WalletController extends BaseController
...
@@ -80,16 +80,16 @@ class WalletController extends BaseController
$code
=
0
;
$code
=
0
;
$msg
=
'success'
;
$msg
=
'success'
;
$platform_id
=
Yii
::
$app
->
request
->
get
(
'platform_id'
,
''
);
$platform_id
=
Yii
::
$app
->
request
->
get
(
'platform_id'
,
''
);
$
address
=
Yii
::
$app
->
request
->
get
(
'address'
,
''
);
$
token
=
Yii
::
$app
->
request
->
get
(
'address'
,
''
);
if
(
empty
(
$platform_id
)
||
empty
(
$
address
)){
if
(
empty
(
$platform_id
)
||
empty
(
$
token
)){
$msg
=
'参数
错误
'
;
$msg
=
'参数
不能为空
'
;
$code
=
-
1
;
$code
=
-
1
;
$data
=
null
;
$data
=
null
;
goto
doEnd
;
goto
doEnd
;
}
}
$node
=
Yii
::
$app
->
params
[
'chain_nodes'
][
'STO'
];
$service
=
new
Chain33Service
();
$service
=
new
Chain33Service
(
$node
);
$address
[]
=
$
address
;
$address
[]
=
$
token
;
$execer
=
'coins'
;
$execer
=
'coins'
;
$result
=
$service
->
getBalance
(
$address
,
$execer
);
$result
=
$service
->
getBalance
(
$address
,
$execer
);
if
(
0
!==
$result
[
'code'
]
&&
null
==
$result
[
'error'
])
{
if
(
0
!==
$result
[
'code'
]
&&
null
==
$result
[
'error'
])
{
...
...
console/controllers/IssueCoinController.php
View file @
a45e02cc
...
@@ -27,7 +27,8 @@ class IssueCoinController extends Controller
...
@@ -27,7 +27,8 @@ class IssueCoinController extends Controller
echo
date
(
'Y-m-d H:i:s'
)
.
'暂无发行任务'
.
PHP_EOL
;
echo
date
(
'Y-m-d H:i:s'
)
.
'暂无发行任务'
.
PHP_EOL
;
return
0
;
return
0
;
}
}
$chain_service
=
new
Chain33Service
();
$node
=
Yii
::
$app
->
params
[
'chain_nodes'
][
'STO'
];
$chain_service
=
new
Chain33Service
(
$node
);
foreach
(
$issue_coin_model
as
$issue_coin
)
{
foreach
(
$issue_coin_model
as
$issue_coin
)
{
go
(
function
()
use
(
$issue_coin
,
$chain_service
)
{
go
(
function
()
use
(
$issue_coin
,
$chain_service
)
{
\Co
::
sleep
(
0.5
);
\Co
::
sleep
(
0.5
);
...
@@ -79,7 +80,8 @@ class IssueCoinController extends Controller
...
@@ -79,7 +80,8 @@ class IssueCoinController extends Controller
return
0
;
return
0
;
}
}
$chain_service
=
new
Chain33Service
();
$node
=
Yii
::
$app
->
params
[
'chain_nodes'
][
'STO'
];
$chain_service
=
new
Chain33Service
(
$node
);
foreach
(
$issue_coin_model
as
$issue_coin
)
{
foreach
(
$issue_coin_model
as
$issue_coin
)
{
go
(
function
()
use
(
$issue_coin
,
$chain_service
)
{
go
(
function
()
use
(
$issue_coin
,
$chain_service
)
{
\Co
::
sleep
(
0.5
);
\Co
::
sleep
(
0.5
);
...
...
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