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