Commit d2568e2c by xmy

# 1.0.27

- cmq 内外网切换
parent 1fe6e16b
# 1.0.27
- cmq 内外网切换
# 1.0.26
- 卖家分销 消息队列枚举
# 1.0.25
......
......@@ -29,7 +29,9 @@ class Account
{
$config = include alias('@vendor/hdll/services/src/Common/Config') . '/config.php';
$config = $config['cmq'];
$this->host = empty($host) ? $config['host'] : $host;
if (empty($host)){
$this->host = empty(env('ENVIRONMENT','')) ?$config['intranet_host'] : $config['internet_host'];
}
$this->secretId = empty($secretId) ? $config['secretId'] : $secretId;
$this->secretKey = empty($secretKey) ? $config['secretKey'] : $secretKey;
$this->cmq_client = new CMQClient($this->host, $this->secretId, $this->secretKey);
......
......@@ -18,8 +18,8 @@ return [
'secretKey' => 'IPL5g5PaaSAzd6NSO8gEmLxcN4pTzJSQ',
],
'cmq' => [
// 'host' => 'http://cmq-topic-bj.api.tencentyun.com',//内网
'host' => 'https://cmq-topic-bj.api.qcloud.com',//外网
'intranet_host' => 'http://cmq-topic-bj.api.tencentyun.com',//内网
'internet_host' => 'https://cmq-topic-bj.api.qcloud.com',//外网
'secretId' => 'AKIDYRW1cG2iVIg8dAoCe86vhNuA7A5oNknk',
'secretKey' => 'z0ymS7xfLrP6Sk2EKHWaXN6d0EIxX0IQ',
],
......
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