shish 4 سال پیش
والد
کامیت
9eef268c9b
1فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 7 1
      app-ghs/controllers/AuthController.php

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

@@ -371,6 +371,13 @@ class AuthController extends PublicController
         if (password_verify($password, $admin['password']) == false) {
             util::fail('密码错误');
         }
+        $openShop = $admin['openShop'] ?? 1;
+        $currentShopId = $admin['currentShopId'] ?? 0;
+        if (empty($currentShopId)) {
+            if ($openShop == 2) {
+                util::fail('您的店铺处于审核状态');
+            }
+        }
         $adminId = $admin['id'];
         $shopAdmin = ShopAdminService::getByCondition(['adminId' => $adminId, 'delStatus' => 0], true);
         if (empty($shopAdmin)) {
@@ -385,7 +392,6 @@ class AuthController extends PublicController
         }
         $token = jwt::getNewToken($adminId);
         $shopAdminId = $shopAdmin->id ?? 0;
-        $currentShopId = $admin['currentShopId'] ?? 0;
         //是否有切换门店的权限
         $switchShop = \biz\shop\classes\ShopAdminClass::hasSwitchShopRight($shopAdmin->attributes);
         //1没有开店 2已申请待审核 3已开店