|
|
@@ -88,6 +88,11 @@ class ShopController extends BaseController
|
|
|
{
|
|
|
$data = Yii::$app->request->post();
|
|
|
|
|
|
+ $shop = $this->shop;
|
|
|
+ if (isset($shop->default) == false || $shop->default != 1) {
|
|
|
+ util::fail('请在总店修改');
|
|
|
+ }
|
|
|
+
|
|
|
$shopAdmin = $this->shopAdmin;
|
|
|
if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
|
|
|
util::fail('超管才能修改');
|
|
|
@@ -111,10 +116,9 @@ class ShopController extends BaseController
|
|
|
public function actionAdd()
|
|
|
{
|
|
|
$shop = $this->shop;
|
|
|
- $join = $shop->join ?? 0;
|
|
|
$default = $shop->default ?? 0;
|
|
|
- if ($join == 0 && $default == 0) {
|
|
|
- util::fail('请在总店操作');
|
|
|
+ if ($default == 0) {
|
|
|
+ util::fail('请在总店添加');
|
|
|
}
|
|
|
|
|
|
$data = Yii::$app->request->post();
|