|
|
@@ -593,12 +593,12 @@ class AuthController extends PublicController
|
|
|
if (empty($openid)) {
|
|
|
Yii::info(json_encode($arr));
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '', 'currentMiniOpenId' => $openid]);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid,'sn'=>1]);
|
|
|
}
|
|
|
$admin = AdminService::getByCondition(['miniOpenId' => $openid]);
|
|
|
if (empty($admin)) {
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '', 'currentMiniOpenId' => $openid]);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid,'sn'=>2]);
|
|
|
}
|
|
|
$adminId = $admin['id'];
|
|
|
|
|
|
@@ -619,12 +619,12 @@ class AuthController extends PublicController
|
|
|
$currentShopId = $admin['currentShopId'] ?? 0;
|
|
|
if (empty($currentShopId)) {
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '', 'currentMiniOpenId' => $openid]);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid,'sn'=>3]);
|
|
|
}
|
|
|
$currentShop = ShopClass::getById($currentShopId, true);
|
|
|
if (empty($currentShop)) {
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '', 'currentMiniOpenId' => $openid]);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid,'sn'=>4]);
|
|
|
}
|
|
|
$mainId = $currentShop->mainId ?? 0;
|
|
|
$pfShopId = $currentShop->pfShopId ?? 0;
|
|
|
@@ -638,11 +638,11 @@ class AuthController extends PublicController
|
|
|
$shopAdmin = ShopAdminClass::getByCondition(['mainId' => $mainId, 'adminId' => $adminId], true);
|
|
|
if (empty($shopAdmin)) {
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '', 'currentMiniOpenId' => $openid]);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid,'sn'=>5]);
|
|
|
}
|
|
|
if (isset($shopAdmin->status) == false || $shopAdmin->status == 0) {
|
|
|
//账号冻结不再自动登录
|
|
|
- util::success(['token' => '', 'currentMiniOpenId' => $openid]);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid,'sn'=>6]);
|
|
|
}
|
|
|
$shopAdmin->lastLogin = date("Y-m-d H:i:s");
|
|
|
$shopAdmin->save();
|