Commit a45e02cc authored by shajiaiming's avatar shajiaiming

修复已知问题

parent 3d2f449f
...@@ -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']) {
......
...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment