1
This commit is contained in:
parent
4867606b95
commit
7cc10cb6fc
@ -428,7 +428,7 @@ class MarketController extends BaseController {
|
|||||||
'nonce' => $nonce,
|
'nonce' => $nonce,
|
||||||
'signature' => $signature
|
'signature' => $signature
|
||||||
);
|
);
|
||||||
$url = 'http://192.168.100.39:7671/webapp/index.php';
|
$url = $this->getWeb3ServiceUrl();
|
||||||
$response = '';
|
$response = '';
|
||||||
if (!phpcommon\HttpClient::get
|
if (!phpcommon\HttpClient::get
|
||||||
($url,
|
($url,
|
||||||
@ -478,6 +478,7 @@ class MarketController extends BaseController {
|
|||||||
'nonce' => $nonce,
|
'nonce' => $nonce,
|
||||||
'signature' => $signature
|
'signature' => $signature
|
||||||
);
|
);
|
||||||
|
$url = $this->getWeb3ServiceUrl();
|
||||||
$url = 'http://192.168.100.39:7671/webapp/index.php';
|
$url = 'http://192.168.100.39:7671/webapp/index.php';
|
||||||
$response = '';
|
$response = '';
|
||||||
if (!phpcommon\HttpClient::get
|
if (!phpcommon\HttpClient::get
|
||||||
@ -510,4 +511,18 @@ class MarketController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function getWeb3ServiceUrl()
|
||||||
|
{
|
||||||
|
$web3ServiceCluster = require_once('../config/market.web3service.cluster.php');
|
||||||
|
if (empty($web3ServiceCluster)) {
|
||||||
|
if (SERVER_ENV == _TEST) {
|
||||||
|
return 'http://127.0.0.1:7671/webapp/index.php';
|
||||||
|
}
|
||||||
|
myself()->_rspErr(1, 'server internal errror');
|
||||||
|
die();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return $web3ServiceCluster[rand() % count($web3ServiceCluster)];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user