修改
This commit is contained in:
parent
63f1502cbb
commit
cde1d98426
@ -227,19 +227,18 @@ class LoginLogic extends BaseLogic
|
|||||||
$response = (new WeChatMnpService())->getMnpResByCode($params['code']);
|
$response = (new WeChatMnpService())->getMnpResByCode($params['code']);
|
||||||
$userServer = new WechatUserService($response, UserTerminalEnum::WECHAT_MMP);
|
$userServer = new WechatUserService($response, UserTerminalEnum::WECHAT_MMP);
|
||||||
$userInfo = $userServer->getResopnseByUserInfo()->authUserLogin()->getUserInfo();
|
$userInfo = $userServer->getResopnseByUserInfo()->authUserLogin()->getUserInfo();
|
||||||
|
|
||||||
// 更新登录信息
|
// 更新登录信息
|
||||||
self::updateLoginInfo($userInfo['id']);
|
self::updateLoginInfo($userInfo['id']);
|
||||||
//判断是不是员工
|
//判断是不是员工
|
||||||
$userInfo['is_staff'] = 0;
|
// $userInfo['is_staff'] = 0;
|
||||||
$userInfo['store_id'] = 0;
|
// $userInfo['store_id'] = 0;
|
||||||
if(isset($userInfo['mobile']) && $userInfo['mobile']){
|
// if(isset($userInfo['mobile']) && $userInfo['mobile']){
|
||||||
$check = SystemStoreStaff::where('phone',$userInfo['mobile'])->find()??[];
|
// $check = SystemStoreStaff::where('phone',$userInfo['mobile'])->find()??[];
|
||||||
if ($check){
|
// if ($check){
|
||||||
$userInfo['is_staff'] = 1;
|
// $userInfo['is_staff'] = 1;
|
||||||
$userInfo['store_id'] = $check['store_id'];
|
// $userInfo['store_id'] = $check['store_id'];
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return $userInfo;
|
return $userInfo;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user