Bladeren bron

微信菜单

shish 6 jaren geleden
bovenliggende
commit
2469acdc31
2 gewijzigde bestanden met toevoegingen van 10 en 1 verwijderingen
  1. 4 0
      common/config/params.php
  2. 6 1
      common/services/xhWxMenuService.php

+ 4 - 0
common/config/params.php

@@ -69,6 +69,7 @@ if (getenv('YII_ENV') == 'local') {
 	$config['imgHost'] = $prefixHttp . 'img.hhb.com';
     $config['wDomain'] = $prefixHttp . 'www.hhb.com';
     $config['mDomain'] = $prefixHttp . 'm.hhb.com';
+    $config['bDomain'] = $prefixHttp . 'b.hhb.com';
 }
 if (getenv('YII_ENV') == 'test') {
 	$config['mHost'] = $prefixHttp . 'api.m.hzghd.com';
@@ -82,6 +83,7 @@ if (getenv('YII_ENV') == 'test') {
 	$config['imgHost'] = $prefixHttp . 'img.hzghd.com';
     $config['wDomain'] = $prefixHttp . 'www.hzghd.com';
     $config['mDomain'] = $prefixHttp . 'm.hzghd.com';
+    $config['bDomain'] = $prefixHttp . 'b.hzghd.com';
 }
 if (getenv('YII_ENV') == 'dev') {
 	$config['mHost'] = $prefixHttp . 'api.m.huaml.com';
@@ -95,6 +97,7 @@ if (getenv('YII_ENV') == 'dev') {
 	$config['imgHost'] = $prefixHttp . 'img.huaml.com';
     $config['wDomain'] = $prefixHttp . 'www.huaml.com';
     $config['mDomain'] = $prefixHttp . 'm.huaml.com';
+    $config['bDomain'] = $prefixHttp . 'b.huaml.com';
 }
 if (getenv('YII_ENV') == 'production') {
 	$config['mHost'] = $prefixHttp . 'api.m.huahb.com';
@@ -108,5 +111,6 @@ if (getenv('YII_ENV') == 'production') {
 	$config['imgHost'] = $prefixHttp . 'img.huahb.com';
     $config['wDomain'] = $prefixHttp . 'www.huahb.com';
     $config['mDomain'] = $prefixHttp . 'm.huahb.com';
+    $config['bDomain'] = $prefixHttp . 'b.huahb.com';
 }
 return $config;

+ 6 - 1
common/services/xhWxMenuService.php

@@ -22,10 +22,12 @@ class xhWxMenuService
         $menuOption = configDict::getConfig('wxMenuOption');
         $mDomain = Yii::$app->params['mDomain'];
         $wDomain = Yii::$app->params['wDomain'];
+        $bDomain = Yii::$app->params['bDomain'];
         //默认使用https方式
         if (strpos($mDomain, 'https') === false) {
             $mDomain = str_replace('http', 'https', $mDomain);
             $wDomain = str_replace('http', 'https', $wDomain);
+            $bDomain = str_replace('http', 'https', $bDomain);
         }
         $button = [
             ["type" => 'view', "name" => "鲜花速递", "menuOption" => $menuOption['redirectToCommonUseUrl'], "url" => $mDomain . '/#/?account=' . $merchantId,],
@@ -37,8 +39,11 @@ class xhWxMenuService
         if (isset($open['merchantId']) && $open['merchantId'] == $merchantId) {
             $button = [
                 ["type" => 'view', "name" => "官网", "menuOption" => $menuOption['redirectToCommonUseUrl'], "url" => $wDomain],
-                ["type" => "view", "name" => "快速付款", "menuOption" => $menuOption['redirectToCustomUrl'], "url" => $mDomain . '/#/pages/pay/index?account=' . $merchantId],
                 ["type" => "view", "name" => "商城", "menuOption" => $menuOption['redirectToCustomUrl'], "url" => $mDomain . '/#/?account=' . $merchantId,],
+                ["type" => "view", "name" => "更多", "menuOption" => $menuOption['redirectToCommonUseUrl'], "sub_button" => [
+                    ["type" => "view", "name" => "快速付款", "menuOption" => $menuOption['redirectToCustomUrl'], "url" => $mDomain . '/#/pages/pay/index?account=' . $merchantId],
+                    ["type" => "view", "name" => "后台", "menuOption" => $menuOption['redirectToCustomUrl'], "url" => $bDomain . '/#/?account=' . $merchantId],
+                ],],
             ];
         }
         $wxUtil = new wxUtil($merchant);