|
|
@@ -7,6 +7,8 @@ use biz\shop\classes\ShopClass;
|
|
|
use bizHd\admin\classes\ShopAdminClass;
|
|
|
use bizHd\admin\services\ShopAdminService;
|
|
|
use bizHd\admin\services\AdminService;
|
|
|
+use bizHd\member\classes\MemberLevelClass;
|
|
|
+use bizHd\recharge\classes\RechargeSqClass;
|
|
|
use bizHd\user\classes\UserClass;
|
|
|
use bizHd\wx\services\WxOpenService;
|
|
|
use common\components\dict;
|
|
|
@@ -65,7 +67,7 @@ class AuthController extends PublicController
|
|
|
//noticeUtil::push($cacheKey . " 登录失败了!获取手机号失败", '15280215347');
|
|
|
util::success(['hasNoOpenId' => 1], '登录失败了哦');
|
|
|
}
|
|
|
- $cacheKey = 'getMobile_'.$phoneNumber;
|
|
|
+ $cacheKey = 'getMobile_' . $phoneNumber;
|
|
|
Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 300, 1]);
|
|
|
util::success(['mobile' => $phoneNumber]);
|
|
|
}
|
|
|
@@ -166,6 +168,11 @@ class AuthController extends PublicController
|
|
|
$shopAdmin->super = 0;
|
|
|
}
|
|
|
|
|
|
+ //充值送钱有没设置,没有设置则进行设置,临时方法,后面需要去掉 ssh 20251229
|
|
|
+ RechargeSqClass::initData($currentShop);
|
|
|
+ //会员等级有没设置,没有设置则进行设置,临时方法,后面需要去掉 ssh 20251229
|
|
|
+ MemberLevelClass::initData($currentShop);
|
|
|
+
|
|
|
//涉及几个登录的地方,需要同步修改,请搜索关键词uni_login_info
|
|
|
util::success([
|
|
|
'token' => $token,
|
|
|
@@ -595,12 +602,12 @@ class AuthController extends PublicController
|
|
|
if (empty($openid)) {
|
|
|
Yii::info(json_encode($arr));
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '', 'currentMiniOpenId' => $openid,'sn'=>1]);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid, 'sn' => 1]);
|
|
|
}
|
|
|
$admin = AdminService::getByCondition(['miniOpenId' => $openid]);
|
|
|
if (empty($admin)) {
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '', 'currentMiniOpenId' => $openid,'sn'=>2]);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid, 'sn' => 2]);
|
|
|
}
|
|
|
$adminId = $admin['id'];
|
|
|
|
|
|
@@ -621,12 +628,12 @@ class AuthController extends PublicController
|
|
|
$currentShopId = $admin['currentShopId'] ?? 0;
|
|
|
if (empty($currentShopId)) {
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '', 'currentMiniOpenId' => $openid,'sn'=>3]);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid, 'sn' => 3]);
|
|
|
}
|
|
|
$currentShop = ShopClass::getById($currentShopId, true);
|
|
|
if (empty($currentShop)) {
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '', 'currentMiniOpenId' => $openid,'sn'=>4]);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid, 'sn' => 4]);
|
|
|
}
|
|
|
$mainId = $currentShop->mainId ?? 0;
|
|
|
$pfShopId = $currentShop->pfShopId ?? 0;
|
|
|
@@ -640,11 +647,11 @@ class AuthController extends PublicController
|
|
|
$shopAdmin = ShopAdminClass::getByCondition(['mainId' => $mainId, 'adminId' => $adminId], true);
|
|
|
if (empty($shopAdmin)) {
|
|
|
//没有管理店铺不允许登录
|
|
|
- util::success(['token' => '', 'currentMiniOpenId' => $openid,'sn'=>5]);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid, 'sn' => 5]);
|
|
|
}
|
|
|
if (isset($shopAdmin->status) == false || $shopAdmin->status == 0) {
|
|
|
//账号冻结不再自动登录
|
|
|
- util::success(['token' => '', 'currentMiniOpenId' => $openid,'sn'=>6]);
|
|
|
+ util::success(['token' => '', 'currentMiniOpenId' => $openid, 'sn' => 6]);
|
|
|
}
|
|
|
$shopAdmin->lastLogin = date("Y-m-d H:i:s");
|
|
|
$shopAdmin->save();
|