|
|
@@ -296,14 +296,14 @@ class AuthController extends PublicController
|
|
|
$openid = $arr['openid'] ?? '';
|
|
|
if (empty($openid)) {
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '']);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid]);
|
|
|
}
|
|
|
$cacheKey = 'GHS_SHOP_MINI_SESSION_KEY_' . $openid;
|
|
|
Yii::$app->redis->executeCommand('SET', [$cacheKey, $sessionKey]);
|
|
|
$admin = AdminService::getByMiniOpenId($openid);
|
|
|
if (empty($admin)) {
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '']);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid]);
|
|
|
}
|
|
|
$adminId = $admin['id'];
|
|
|
//1没有开店 2已申请待审核 3已开店
|
|
|
@@ -311,12 +311,12 @@ class AuthController extends PublicController
|
|
|
$currentShopId = $admin['currentShopId'] ?? 0;
|
|
|
if (empty($currentShopId)) {
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '']);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid]);
|
|
|
}
|
|
|
$shopAdmin = ShopAdminClass::getByCondition(['shopId' => $currentShopId, 'adminId' => $adminId], true);
|
|
|
if (empty($shopAdmin)) {
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '']);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid]);
|
|
|
}
|
|
|
$shopAdmin->lastLogin = date("Y-m-d H:i:s");
|
|
|
$shopAdmin->save();
|
|
|
@@ -335,7 +335,6 @@ class AuthController extends PublicController
|
|
|
$cacheKey = 'close_book_' . $shopAdminId;
|
|
|
$hasClose = Yii::$app->redis->executeCommand('GET', [$cacheKey]);
|
|
|
$showBook = !empty($hasClose) ? 0 : 1;
|
|
|
-
|
|
|
$cacheKey = 'has_hit_navigate_' . $shopAdminId;
|
|
|
$hasHit = Yii::$app->redis->executeCommand('GET', [$cacheKey]);
|
|
|
$hasHitNavigate = !empty($hasHit) ? 1 : 0;
|