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