|
|
@@ -239,9 +239,13 @@ class AuthController extends PublicController
|
|
|
util::fail('请先注册');
|
|
|
}
|
|
|
$currentShop = ShopClass::getById($currentShopId, true);
|
|
|
+ if (empty($currentShop)) {
|
|
|
+ util::fail('登录失败,没有找到门店');
|
|
|
+ }
|
|
|
$pfShopId = $currentShop->pfShopId ?? 0;
|
|
|
$adminId = $admin['id'];
|
|
|
- $shopAdmin = ShopAdminService::getByCondition(['adminId' => $adminId, 'shopId' => $currentShopId, 'delStatus' => 0], true);
|
|
|
+ $mainId = $currentShop->mainId ?? 0;
|
|
|
+ $shopAdmin = ShopAdminService::getByCondition(['mainId' => $mainId, 'adminId' => $adminId], true);
|
|
|
if (empty($shopAdmin)) {
|
|
|
util::fail('没有权限操作');
|
|
|
}
|