shish 5 yıl önce
ebeveyn
işleme
2f148a4c56

+ 1 - 1
app-ghs/controllers/AuthController.php

@@ -176,7 +176,7 @@ class AuthController extends PublicController
     public function actionMiniInfo()
     {
         //供货商平台
-        Yii::$app->params['ptStyle'] = 2;
+        Yii::$app->params['ptStyle']  = dict::getDict('ptStyle', 'ghs');
         $code = Yii::$app->request->get('code', '');
         if (empty($code)) {
             $demoId = dict::getDict('ghsDemoAdminId');

+ 2 - 1
app-ghs/controllers/BaseController.php

@@ -9,6 +9,7 @@ use biz\sj\classes\SjClass;
 use biz\sj\services\MerchantExtendService;
 use biz\sj\services\MerchantService;
 use bizGhs\admin\services\AdminService;
+use common\components\dict;
 use common\components\jwt;
 use Yii;
 use common\components\util;
@@ -26,7 +27,7 @@ class BaseController extends PublicController
     public function beforeAction($action)
     {
         //定义平台类型 1花店 2供货商
-        Yii::$app->params['ptStyle'] = 2;
+        Yii::$app->params['ptStyle'] = dict::getDict('ptStyle', 'ghs');
 
         //token验证
         $adminId = jwt::getLoginId();

+ 1 - 1
app-hd/controllers/AuthController.php

@@ -173,7 +173,7 @@ class AuthController extends PublicController
     public function actionMiniInfo()
     {
         //花店平台
-        Yii::$app->params['ptStyle'] = 1;
+        Yii::$app->params['ptStyle']  = dict::getDict('ptStyle', 'hd');
 
         $code = Yii::$app->request->get('code', '');
         if (empty($code)) {

+ 2 - 1
app-hd/controllers/BaseController.php

@@ -9,6 +9,7 @@ use biz\shop\classes\ShopAdminClass;
 use biz\sj\classes\MerchantExtendClass;
 use biz\sj\services\MerchantService;
 use bizHd\merchant\services\ShopService;
+use common\components\dict;
 use common\components\jwt;
 use Yii;
 use common\components\util;
@@ -28,7 +29,7 @@ class BaseController extends PublicController
     public function beforeAction($action)
     {
         //定义平台类型 1花店 2供货商 3商城
-        Yii::$app->params['ptStyle'] = 1;
+        Yii::$app->params['ptStyle'] = dict::getDict('ptStyle', 'hd');
 
         //token验证
         $adminId = jwt::getLoginId();

+ 2 - 1
app-mall/controllers/BaseController.php

@@ -8,6 +8,7 @@ use bizHd\custom\classes\CustomClass;
 use bizMall\merchant\services\MerchantExtendService;
 use bizMall\merchant\services\MerchantService;
 use bizMall\user\services\UserService;
+use common\components\dict;
 use common\components\httpUtil;
 use common\components\jwt;
 use common\components\util;
@@ -25,7 +26,7 @@ class BaseController extends PublicController
     public function beforeAction($action)
     {
         //定义平台类型 1花店 2供货商 3商城
-        Yii::$app->params['ptStyle'] = 3;
+        Yii::$app->params['ptStyle']  = dict::getDict('ptStyle', 'mall');
         $userId = jwt::getLoginId();
         if (empty($userId)) {
             util::fail('您还没有登陆');

+ 3 - 3
app-pt/controllers/WxOpenController.php

@@ -263,15 +263,15 @@ class WxOpenController extends PublicController
         $host = Yii::$app->request->getHostInfo();
         if (strpos($host, 'huaml.com') !== false || strpos($host, 'huahb.cn') !== false) {
             //花店
-            Yii::$app->params['ptStyle'] = 1;
+            Yii::$app->params['ptStyle']  = dict::getDict('ptStyle', 'hd');
             $isOpen = 1;
         } elseif (strpos($host, 'theflorist.cn') !== false || strpos($host, 'zhiguanhua.cn') !== false) {
             //商城
-            Yii::$app->params['ptStyle'] = 3;
+            Yii::$app->params['ptStyle']  = dict::getDict('ptStyle', 'mall');
             $isOpen = 3;
         } elseif (strpos($host, 'hzghd.com') !== false || strpos($host, 'wixhb.com') !== false) {
             //供货商
-            Yii::$app->params['ptStyle'] = 2;
+            Yii::$app->params['ptStyle']  = dict::getDict('ptStyle', 'ghs');
             $isOpen = 2;
         } else {
             util::stop('域名无效');

+ 2 - 2
console/controllers/PurchaseController.php

@@ -5,6 +5,7 @@ namespace console\controllers;
 use bizHd\purchase\classes\PurchaseClass;
 use bizHd\purchase\models\Purchase;
 use bizHd\purchase\services\PurchaseService;
+use common\components\dict;
 use common\components\noticeUtil;
 use yii\console\Controller;
 use Yii;
@@ -25,8 +26,7 @@ class PurchaseController extends Controller
         $connection = Yii::$app->db;//事务处理
         $transaction = $connection->beginTransaction();
 
-        //定义平台类型 1花店 2供货商 3商城
-        Yii::$app->params['ptStyle'] = 1;
+        Yii::$app->params['ptStyle']  = dict::getDict('ptStyle', 'hd');
 
         try {
             $arr = [];