This commit is contained in:
liu 2024-06-03 17:48:31 +08:00
parent 63f1502cbb
commit cde1d98426

View File

@ -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;