|
|
@@ -12,93 +12,101 @@ $wwwUrl = $http . 'www.' . $suffix;
|
|
|
$cssUrl = $http . 'css.' . $suffix;
|
|
|
$jsUrl = $http . 'js.' . $suffix;
|
|
|
$config = [
|
|
|
- //全站统一使用的秘钥
|
|
|
- 'secretKey' => 'CzWjvVY5F.dUqT65Knj81qh_eU2wI3SokO',
|
|
|
- 'adminUrl' => $adminUrl,
|
|
|
- 'frontUrl' => $frontUrl,
|
|
|
- 'openUrl' => $openUrl,
|
|
|
- 'picUrl' => $picUrl,
|
|
|
- 'wwwUrl' => $wwwUrl,
|
|
|
- 'mobileUrl' => $mobileUrl,
|
|
|
- 'miniUrl' => $miniUrl,
|
|
|
- //平台来源
|
|
|
- 'ptSource' => [
|
|
|
- //商城移动端
|
|
|
- 'mobile' => 1,
|
|
|
- //商城小程序
|
|
|
- 'mini' => 2,
|
|
|
- //商家后台PC端
|
|
|
- 'admin' => 3,
|
|
|
- //商家后台移动端
|
|
|
- 'back' => 4,
|
|
|
- //总后台
|
|
|
- 'saas' => 5,
|
|
|
- ],
|
|
|
- //永不过期时间
|
|
|
- 'neverExpireTime' => 4102416000,
|
|
|
- //永不过期日期
|
|
|
- 'neverExpireDate' => '2100-01-01 00:00:00',
|
|
|
- 'pageSize' => 20,
|
|
|
+ //全站统一使用的秘钥
|
|
|
+ 'secretKey' => 'CzWjvVY5F.dUqT65Knj81qh_eU2wI3SokO',
|
|
|
+ 'adminUrl' => $adminUrl,
|
|
|
+ 'frontUrl' => $frontUrl,
|
|
|
+ 'openUrl' => $openUrl,
|
|
|
+ 'picUrl' => $picUrl,
|
|
|
+ 'wwwUrl' => $wwwUrl,
|
|
|
+ 'mobileUrl' => $mobileUrl,
|
|
|
+ 'miniUrl' => $miniUrl,
|
|
|
+ //平台来源
|
|
|
+ 'ptSource' => [
|
|
|
+ //商城移动端
|
|
|
+ 'mobile' => 1,
|
|
|
+ //商城小程序
|
|
|
+ 'mini' => 2,
|
|
|
+ //商家后台PC端
|
|
|
+ 'admin' => 3,
|
|
|
+ //商家后台移动端
|
|
|
+ 'back' => 4,
|
|
|
+ //总后台
|
|
|
+ 'pt' => 5,
|
|
|
+ ],
|
|
|
+ //永不过期时间
|
|
|
+ 'neverExpireTime' => 4102416000,
|
|
|
+ //永不过期日期
|
|
|
+ 'neverExpireDate' => '2100-01-01 00:00:00',
|
|
|
+ 'pageSize' => 20,
|
|
|
];
|
|
|
|
|
|
$prefixHttp = 'http://';
|
|
|
$userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
|
|
|
if (strpos($userAgent, 'miniprogram') === true) {
|
|
|
- $prefixHttp = 'https://';
|
|
|
+ $prefixHttp = 'https://';
|
|
|
}
|
|
|
$referrer = isset($_SERVER["HTTP_REFERER"]) ? strtolower($_SERVER["HTTP_REFERER"]) : '';
|
|
|
if (strpos($referrer, 'servicewechat.com') === true) {
|
|
|
- $prefixHttp = 'https://';
|
|
|
+ $prefixHttp = 'https://';
|
|
|
}
|
|
|
if (strpos($referrer, 'https') === true) {
|
|
|
- $prefixHttp = 'https://';
|
|
|
+ $prefixHttp = 'https://';
|
|
|
}
|
|
|
-if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'){
|
|
|
- $prefixHttp = 'https://';
|
|
|
+if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
|
|
|
+ $prefixHttp = 'https://';
|
|
|
}
|
|
|
|
|
|
if (getenv('YII_ENV') == 'local') {
|
|
|
- $config['mallHost'] = $prefixHttp . 'api.mall.hhb.com';
|
|
|
- $config['shopHost'] = $prefixHttp . 'api.shop.hhb.com';
|
|
|
- $config['ptHost'] = $prefixHttp . 'api.saas.hhb.com';
|
|
|
- $config['ghsHost'] = $prefixHttp . 'api.ghs.hhb.com';
|
|
|
- $config['host'] = 'hhb.com';
|
|
|
- $config['imgHost'] = $prefixHttp . 'img.hhb.com';
|
|
|
- $config['mallDomain'] = $prefixHttp . 'mall.hhb.com';
|
|
|
- $config['shopDomain'] = $prefixHttp . 'shop.hhb.com';
|
|
|
- $config['ghsDomain'] = $prefixHttp . 'ghs.hhb.com';
|
|
|
+ $config['hdHost'] = $prefixHttp . 'api.shop.hhb.com';
|
|
|
+ $config['hdDomain'] = $prefixHttp . 'shop.hhb.com';
|
|
|
+ $config['hdPtHost'] = $prefixHttp . 'api.pt.hhb.com';
|
|
|
+ $config['hdShortHost'] = 'hhb.com';
|
|
|
+ $config['hdImgHost'] = $prefixHttp . 'img.hhb.com';
|
|
|
+
|
|
|
+ $config['ghsHost'] = $prefixHttp . 'api.ghs.xhb.com';
|
|
|
+ $config['ghsDomain'] = $prefixHttp . 'shop.xhb.com';
|
|
|
+ $config['ghsPtHost'] = $prefixHttp . 'api.pt.xhb.com';
|
|
|
+ $config['ghsShortHost'] = 'xhb.com';
|
|
|
+ $config['ghsImgHost'] = $prefixHttp . 'img.xhb.com';
|
|
|
}
|
|
|
if (getenv('YII_ENV') == 'test') {
|
|
|
- $config['mallHost'] = $prefixHttp . 'api.mall.hzghd.com';
|
|
|
- $config['shopHost'] = $prefixHttp . 'api.shop.hzghd.com';
|
|
|
- $config['ptHost'] = $prefixHttp . 'api.saas.hzghd.com';
|
|
|
+ $config['hdHost'] = $prefixHttp . 'api.shop.huaml.com';
|
|
|
+ $config['hdDomain'] = $prefixHttp . 'shop.huaml.com';
|
|
|
+ $config['hdPtHost'] = $prefixHttp . 'api.pt.huaml.com';
|
|
|
+ $config['hdShortHost'] = 'huaml.com';
|
|
|
+ $config['hdImgHost'] = $prefixHttp . 'img.huaml.com';
|
|
|
+
|
|
|
$config['ghsHost'] = $prefixHttp . 'api.ghs.hzghd.com';
|
|
|
- $config['host'] = 'hzghd.com';
|
|
|
- $config['imgHost'] = $prefixHttp . 'img.hzghd.com';
|
|
|
- $config['mallDomain'] = $prefixHttp . 'mall.hzghd.com';
|
|
|
- $config['shopDomain'] = $prefixHttp . 'shop.hzghd.com';
|
|
|
- $config['ghsDomain'] = $prefixHttp . 'ghs.hzghd.com';
|
|
|
+ $config['ghsDomain'] = $prefixHttp . 'shop.hzghd.com';
|
|
|
+ $config['ghsPtHost'] = $prefixHttp . 'api.pt.hzghd.com';
|
|
|
+ $config['ghsShortHost'] = 'hzghd.com';
|
|
|
+ $config['ghsImgHost'] = $prefixHttp . 'img.hzghd.com';
|
|
|
}
|
|
|
if (getenv('YII_ENV') == 'dev') {
|
|
|
- $config['mallHost'] = $prefixHttp . 'api.mall.huaml.com';
|
|
|
- $config['shopHost'] = $prefixHttp . 'api.shop.huaml.com';
|
|
|
- $config['ptHost'] = $prefixHttp . 'api.saas.huaml.com';
|
|
|
- $config['ghsHost'] = $prefixHttp . 'api.ghs.huaml.com';
|
|
|
- $config['host'] = 'huaml.com';
|
|
|
- $config['imgHost'] = $prefixHttp . 'img.huaml.com';
|
|
|
- $config['mallDomain'] = $prefixHttp . 'mall.huaml.com';
|
|
|
- $config['shopDomain'] = $prefixHttp . 'shop.huaml.com';
|
|
|
- $config['ghsDomain'] = $prefixHttp . 'ghs.huaml.com';
|
|
|
+ $config['hdHost'] = $prefixHttp . 'api.shop.huaml.com';
|
|
|
+ $config['hdDomain'] = $prefixHttp . 'shop.huaml.com';
|
|
|
+ $config['hdPtHost'] = $prefixHttp . 'api.pt.huaml.com';
|
|
|
+ $config['hdShortHost'] = 'huaml.com';
|
|
|
+ $config['hdImgHost'] = $prefixHttp . 'img.huaml.com';
|
|
|
+
|
|
|
+ $config['ghsHost'] = $prefixHttp . 'api.ghs.hzghd.com';
|
|
|
+ $config['ghsDomain'] = $prefixHttp . 'shop.hzghd.com';
|
|
|
+ $config['ghsPtHost'] = $prefixHttp . 'api.pt.hzghd.com';
|
|
|
+ $config['ghsShortHost'] = 'hzghd.com';
|
|
|
+ $config['ghsImgHost'] = $prefixHttp . 'img.hzghd.com';
|
|
|
}
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
- $config['mallHost'] = $prefixHttp . 'api.mall.huahb.com';
|
|
|
- $config['shopHost'] = $prefixHttp . 'api.shop.huahb.com';
|
|
|
- $config['ptHost'] = $prefixHttp . 'api.saas.huahb.com';
|
|
|
- $config['ghsHost'] = $prefixHttp . 'api.ghs.huahb.com';
|
|
|
- $config['host'] = 'huahb.com';
|
|
|
- $config['imgHost'] = $prefixHttp . 'img.huahb.com';
|
|
|
- $config['mallDomain'] = $prefixHttp . 'mall.huahb.com';
|
|
|
- $config['shopDomain'] = $prefixHttp . 'shop.huahb.com';
|
|
|
- $config['ghsDomain'] = $prefixHttp . 'ghs.huahb.com';
|
|
|
+ $config['hdHost'] = $prefixHttp . 'api.shop.huahb.com';
|
|
|
+ $config['hdDomain'] = $prefixHttp . 'shop.huahb.com';
|
|
|
+ $config['hdPtHost'] = $prefixHttp . 'api.pt.huahb.com';
|
|
|
+ $config['hdShortHost'] = 'huahb.com';
|
|
|
+ $config['hdImgHost'] = $prefixHttp . 'img.huahb.com';
|
|
|
+
|
|
|
+ $config['ghsHost'] = $prefixHttp . 'api.ghs.wixhb.com';
|
|
|
+ $config['ghsDomain'] = $prefixHttp . 'shop.wixhb.com';
|
|
|
+ $config['ghsPtHost'] = $prefixHttp . 'api.pt.wixhb.com';
|
|
|
+ $config['ghsShortHost'] = 'wixhb.com';
|
|
|
+ $config['ghsImgHost'] = $prefixHttp . 'img.wixhb.com';
|
|
|
}
|
|
|
return $config;
|