shish 5 лет назад
Родитель
Сommit
e479563b20
2 измененных файлов с 6 добавлено и 0 удалено
  1. 3 0
      app-ghs/controllers/ApplyController.php
  2. 3 0
      app-hd/controllers/ApplyController.php

+ 3 - 0
app-ghs/controllers/ApplyController.php

@@ -42,6 +42,9 @@ class ApplyController extends BaseController
         $post = Yii::$app->request->post();
         $post['adminId'] = $this->adminId;
         $admin = $this->admin;
+        if (isset($admin['currentShopId']) && !empty($admin['currentShopId'])) {
+            util::fail('您已经是门店员工');
+        }
         $post['adminName'] = $admin['name'] ?? '';
         $post['long'] = isset($post['longitude']) ? $post['longitude'] : '';
         $post['lat'] = isset($post['latitude']) ? $post['latitude'] : '';

+ 3 - 0
app-hd/controllers/ApplyController.php

@@ -43,6 +43,9 @@ class ApplyController extends BaseController
         $post = Yii::$app->request->post();
         $post['adminId'] = $this->adminId;
         $admin = $this->admin;
+        if (isset($admin['currentShopId']) && !empty($admin['currentShopId'])) {
+            util::fail('您已经是门店员工');
+        }
         $post['adminName'] = $admin['name'] ?? '';
         $post['long'] = isset($post['longitude']) ? $post['longitude'] : '';
         $post['lat'] = isset($post['latitude']) ? $post['latitude'] : '';