Merge pull request '优化' (#559) from hotfix/xyy_xmzz_ts into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/559
master
廖金灵 3 years ago
commit c84d2a57d5

@ -47,19 +47,19 @@ class GameResource
public function __construct($game)
{
$this->game = $game;
$this->client = $this->createClient();
$this->client = $this->createClient($game);
}
private function createClient()
private function createClient($game)
{
$clientClass = '';
$gameId = intval($this->game['id']);
$gameId = intval($game['id']);
if (isset($this->clientMap[$gameId])) {
$clientClass = $this->clientMap[$gameId];
} else {
throw new \Exception('游戏资源客户端未配置');
}
return new $clientClass();
return new $clientClass($game);
}
public function getResourceTypes()

@ -23,7 +23,7 @@ class LeyouClient
'provide' => ['uri' => '/api/game/sendGold/zhuimeng/jxlm/57972', 'method' => 'post'],
];
public function __construct()
public function __construct($game = null)
{
$this->client = new Client([
'base_uri' => 'http://chat.leniu.com',

@ -21,7 +21,7 @@ class LsxxClient
'provide' => ['uri' => '/wanmeng/prop.php?action=prop', 'method' => 'post'],
];
public function __construct()
public function __construct($game = null)
{
$this->client = new Client([
'base_uri' => 'http://47.114.91.166:1096',

@ -23,7 +23,7 @@ class SbcqClient
'send-email' => ['uri' => 'sendemail', 'method' => 'post'],
];
public function __construct()
public function __construct($game = null)
{
$this->client = new Client([
'base_uri' => 'http://api.tlcq.90wqiji.com/wan/game/',

@ -29,7 +29,7 @@ class XlqyClient
'send-props' => ['uri' => '/apip/payWM450S00/buyProp', 'method' => 'post'],
];
public function __construct()
public function __construct($game = null)
{
$this->client = new Client([
'base_uri' => 'http://xx2api.hnputihd.com',

@ -16,13 +16,19 @@ class XyyClient
const SIGN_KEY = '51a447dc409b785af03e41a2d5014879';
protected $client;
private $platformId = 600;
private $apis = [
'provide' => ['uri' => '/Api/Statis/sendgold', 'method' => 'post'],
];
public function __construct()
public function __construct($game = null)
{
if ($game && ($game['id'] == 293 || $game['id'] == 294)) {
$this->platformId = 602;
} else {
$this->platformId = 600;
}
$this->client = new Client([
'base_uri' => 'http://x3wm.dgcgame.com:82',
'timeout' => 10.0,
@ -112,7 +118,7 @@ class XyyClient
public function apply($order, $role)
{
$data = [
'pfrom_id' => 600,
'pfrom_id' => $this->platformId,
'server_id' => $role['server_id'],
'actors' => $role['role_id'],
'sendnum_yb' => intval($order['ref_amount']) * 10,

@ -24,7 +24,7 @@ class XyyXmjsClient
'self-apply-foster' => ['uri' => '', 'method' => 'get'],
];
public function __construct()
public function __construct($game = null)
{
$this->client = new Client([
'base_uri' => 'http://rebate.99you.cn/xyy_apply.php/23400/',

@ -31,7 +31,7 @@ class YzchzbClient
'ios' => 11596,
];
public function __construct()
public function __construct($game = null)
{
$this->client = new Client([
'base_uri' => C('GAME_CAT_URL'),

Loading…
Cancel
Save