|
@@ -974,30 +974,30 @@ class NoticeSend
|
|
|
} else {
|
|
} else {
|
|
|
$store_id = get_store_id();
|
|
$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]);
|
|
$setting = Notice::findOne(['store_id' => 0]);
|
|
|
- $store_id = 0;
|
|
|
|
|
if (!$setting) {
|
|
if (!$setting) {
|
|
|
$setting = Notice::findOne(['store_id' => -1]);
|
|
$setting = Notice::findOne(['store_id' => -1]);
|
|
|
- $store_id = -1;
|
|
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} 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]);
|
|
$setting = Notice::findOne(['store_id' => 0]);
|
|
|
$store_id = 0;
|
|
$store_id = 0;
|
|
|
if (!$setting) {
|
|
if (!$setting) {
|
|
|
$setting = Notice::findOne(['store_id' => -1]);
|
|
$setting = Notice::findOne(['store_id' => -1]);
|
|
|
$store_id = -1;
|
|
$store_id = -1;
|
|
|
}
|
|
}
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $setting = Notice::findOne(['store_id' => $store_id]);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if ($setting && $setting->register) {
|
|
if ($setting && $setting->register) {
|