shish 11 ماه پیش
والد
کامیت
d42a6a9cc8
2فایلهای تغییر یافته به همراه17 افزوده شده و 2 حذف شده
  1. 5 1
      common/components/wxUtil.php
  2. 12 1
      common/config/params.php

+ 5 - 1
common/components/wxUtil.php

@@ -1257,15 +1257,18 @@ class wxUtil
         //零售
         $currentHost = Yii::$app->params['hdHost'];
         $imgHost = Yii::$app->params['hdImgHost'];
+        $wss = Yii::$app->params['mallWssHost'];
         if ($isOpen == 2) {
             //供货商
             $currentHost = Yii::$app->params['ghsHost'];
             $imgHost = Yii::$app->params['ghsImgHost'];
+            $wss = Yii::$app->params['ghsWssHost'];
         }
         if ($isOpen == 3) {
             //供货商
             $currentHost = Yii::$app->params['mallHost'];
             $imgHost = Yii::$app->params['mallImgHost'];
+            $wss = Yii::$app->params['hdWssHost'];
         }
 
         //api地址
@@ -1284,10 +1287,11 @@ class wxUtil
 
         $socket = str_replace("https", "", $currentHost);
         $socket = str_replace("http", "", $socket);
+
         $data = [
             "action" => "set",
             "requestdomain" => [$currentHost, $imgHost],
-            "wsrequestdomain" => ['wss' . $socket],
+            "wsrequestdomain" => ['wss' . $socket, $wss],
             "uploaddomain" => [$currentHost, $imgHost],
             "downloaddomain" => [$currentHost, $imgHost],
         ];

+ 12 - 1
common/config/params.php

@@ -84,6 +84,7 @@ if (getenv('YII_ENV') == 'local') {
     //本机号码登录使用线上域名不要修改
     $config['hdUniCloudHost'] = 'http://unicloud.huahb.cn';
     $config['hdImgHost'] = $prefixHttp . 'img.huaml.com/';
+    $config['hdWssHost'] = 'wss://chat.shop.huaml.com';
 
     $config['ghsHost'] = $prefixHttp . 'api.shop.hzghd.com';
     $config['ghsDomain'] = $prefixHttp . 'shop.hzghd.com';
@@ -91,8 +92,8 @@ if (getenv('YII_ENV') == 'local') {
     //本机号码登录使用线上域名不要修改
     $config['ghsUniCloudHost'] = 'http://unicloud.wixhb.com';
     $config['ghsShortHost'] = 'hzghd.com';
-
     $config['ghsImgHost'] = $prefixHttp . 'img.hzghd.com/';
+    $config['ghsWssHost'] = 'wss://chat.shop.huaml.com';
 
     $config['mallHost'] = $prefixHttp . 'api.shop.theflorist.cn';
     $config['mallDomain'] = $prefixHttp . 'shop.theflorist.cn';
@@ -101,6 +102,7 @@ if (getenv('YII_ENV') == 'local') {
     //本机号码登录使用线上域名不要修改
     $config['mallUniCloudHost'] = 'http://unicloud.zhiguanhua.cn';
     $config['mallImgHost'] = $prefixHttp . 'img.theflorist.cn/';
+    $config['mallWssHost'] = 'wss://chat.shop.huaml.com';
 
     $config['ossBucket'] = 'pic-hhb-cs';
 
@@ -114,6 +116,7 @@ if (getenv('YII_ENV') == 'test') {
     //本机号码登录使用线上域名不要修改
     $config['hdUniCloudHost'] = 'http://unicloud.huahb.cn';
     $config['hdImgHost'] = $prefixHttp . 'img.huaml.com/';
+    $config['hdWssHost'] = 'wss://chat.shop.huaml.com';
 
     $config['ghsHost'] = $prefixHttp . 'api.shop.hzghd.com';
     $config['ghsDomain'] = $prefixHttp . 'shop.hzghd.com';
@@ -122,6 +125,7 @@ if (getenv('YII_ENV') == 'test') {
     //本机号码登录使用线上域名不要修改
     $config['ghsUniCloudHost'] = 'http://unicloud.wixhb.com';
     $config['ghsImgHost'] = $prefixHttp . 'img.hzghd.com/';
+    $config['ghsWssHost'] = 'wss://chat.shop.huaml.com';
 
     $config['mallHost'] = $prefixHttp . 'api.shop.theflorist.cn';
     $config['mallDomain'] = $prefixHttp . 'shop.theflorist.cn';
@@ -130,6 +134,7 @@ if (getenv('YII_ENV') == 'test') {
     //本机号码登录使用线上域名不要修改
     $config['mallUniCloudHost'] = 'http://unicloud.zhiguanhua.cn';
     $config['mallImgHost'] = $prefixHttp . 'img.theflorist.cn/';
+    $config['mallWssHost'] = 'wss://chat.shop.huaml.com';
 
     $config['ossBucket'] = 'pic-hhb-cs';
 
@@ -143,6 +148,7 @@ if (getenv('YII_ENV') == 'dev') {
     $config['hdShortHost'] = 'huaml.com';
     $config['hdUniCloudHost'] = 'http://unicloud.huahb.cn';
     $config['hdImgHost'] = $prefixHttp . 'img.huaml.com/';
+    $config['hdWssHost'] = 'wss://chat.shop.huaml.com';
 
     $config['ghsHost'] = $prefixHttp . 'api.shop.hzghd.com';
     $config['ghsDomain'] = $prefixHttp . 'shop.hzghd.com';
@@ -151,6 +157,7 @@ if (getenv('YII_ENV') == 'dev') {
     //本机号码登录使用线上域名不要修改
     $config['ghsUniCloudHost'] = 'http://unicloud.wixhb.com';
     $config['ghsImgHost'] = $prefixHttp . 'img.hzghd.com/';
+    $config['ghsWssHost'] = 'wss://chat.shop.huaml.com';
 
     $config['mallHost'] = $prefixHttp . 'api.shop.theflorist.cn';
     $config['mallDomain'] = $prefixHttp . 'shop.theflorist.cn';
@@ -159,6 +166,7 @@ if (getenv('YII_ENV') == 'dev') {
     //本机号码登录使用线上域名不要修改
     $config['mallUniCloudHost'] = 'http://unicloud.zhiguanhua.cn';
     $config['mallImgHost'] = $prefixHttp . 'img.theflorist.cn/';
+    $config['mallWssHost'] = 'wss://chat.shop.huaml.com';
 
     $config['ossBucket'] = 'pic-hhb-cs';
 
@@ -172,6 +180,7 @@ if (getenv('YII_ENV') == 'production') {
     $config['hdShortHost'] = 'huahb.cn';
     $config['hdUniCloudHost'] = 'http://unicloud.huahb.cn';
     $config['hdImgHost'] = $prefixHttp . 'img.huahb.cn/';
+    $config['hdWssHost'] = 'wss://chat.shop.huahb.cn';
 
     $config['ghsHost'] = $prefixHttp . 'api.shop.wixhb.com';
     $config['ghsDomain'] = $prefixHttp . 'shop.wixhb.com';
@@ -179,6 +188,7 @@ if (getenv('YII_ENV') == 'production') {
     $config['ghsShortHost'] = 'wixhb.com';
     $config['ghsUniCloudHost'] = 'http://unicloud.wixhb.com';
     $config['ghsImgHost'] = $prefixHttp . 'img.wixhb.com/';
+    $config['ghsWssHost'] = 'wss://chat.shop.huahb.cn';
 
     $config['mallHost'] = $prefixHttp . 'api.shop.zhiguanhua.cn';
     $config['mallDomain'] = $prefixHttp . 'shop.zhiguanhua.cn';
@@ -186,6 +196,7 @@ if (getenv('YII_ENV') == 'production') {
     $config['mallShortHost'] = 'zhiguanhua.cn';
     $config['mallUniCloudHost'] = 'http://unicloud.zhiguanhua.cn';
     $config['mallImgHost'] = $prefixHttp . 'img.zhiguanhua.cn/';
+    $config['mallWssHost'] = 'wss://chat.shop.huahb.cn';
 
     $config['ossBucket'] = 'pic-hhb-online';