zhangjidong 4 dní pred
rodič
commit
8e9651822d
1 zmenil súbory, kde vykonal 12 pridanie a 12 odobranie
  1. 12 12
      utils/Notice/NoticeSend.php

+ 12 - 12
utils/Notice/NoticeSend.php

@@ -974,30 +974,30 @@ class NoticeSend
         } else {
             $store_id = get_store_id();
         }
-
-        $store = Store::findOne($store_id);
-        if ($store) {
-            if (!in_array($store->business_model, [1, 2])) {//商盟非独立运营店铺也用联盟端配置
-                $store_id = 0;
-            }
+        $store_id = -1;
+        $self_mini = 1;
+        if ($store_id > 0) {
+            $self_mini = Option::get('self_mini', $store_id, 'store', 0)['value'];
         }
-
-        if ($store_id <= 0) {
+        if (\Yii::$app->prod_is_dandianpu() && !$self_mini) {
             $setting = Notice::findOne(['store_id' => 0]);
-            $store_id = 0;
             if (!$setting) {
                 $setting = Notice::findOne(['store_id' => -1]);
-                $store_id = -1;
             }
         } else {
-            $setting = Notice::findOne(['store_id' => $store_id]);
-            if (!$setting) {
+            $store = Store::findOne($store_id);
+            if ($store->business_model != 1) {//商盟非独立运营店铺也用联盟端配置
+                $store_id = 0;
+            }
+            if ($store_id <= 0) {
                 $setting = Notice::findOne(['store_id' => 0]);
                 $store_id = 0;
                 if (!$setting) {
                     $setting = Notice::findOne(['store_id' => -1]);
                     $store_id = -1;
                 }
+            } else {
+                $setting = Notice::findOne(['store_id' => $store_id]);
             }
         }
         if ($setting && $setting->register) {