修改登录判断,修改病情记录回写传旨
This commit is contained in:
parent
f85ef3801f
commit
50dd519e09
@ -138,7 +138,7 @@ class AutoFinishInquiryDelayDirectConsumer extends ConsumerMessage
|
|||||||
$this->handleOrderInquiryCase($order_inquiry);
|
$this->handleOrderInquiryCase($order_inquiry);
|
||||||
|
|
||||||
// 处理回写患者病情记录-回写失败不做处理
|
// 处理回写患者病情记录-回写失败不做处理
|
||||||
$this->handlePatientPathography($order_inquiry['order_inquiry_id']);
|
$this->handlePatientPathography($order_inquiry);
|
||||||
|
|
||||||
// 处理医生服务患者数量
|
// 处理医生服务患者数量
|
||||||
$this->handleDoctorServedPatientsNum($order_inquiry['doctor_id']);
|
$this->handleDoctorServedPatientsNum($order_inquiry['doctor_id']);
|
||||||
|
|||||||
@ -38,22 +38,32 @@ class LoginService extends BaseService
|
|||||||
$wx_code = $this->request->input('wx_code');
|
$wx_code = $this->request->input('wx_code');
|
||||||
$user_type = $this->request->input('user_type');
|
$user_type = $this->request->input('user_type');
|
||||||
|
|
||||||
|
// 获取微信用户数据
|
||||||
try {
|
try {
|
||||||
$weChat = new Wechat($user_type);
|
$weChat = new Wechat($user_type);
|
||||||
|
|
||||||
// 获取手机号
|
// 获取手机号
|
||||||
$phone_info = $weChat->getPhone($phone_code);
|
$phone_info = $weChat->getPhone($phone_code);
|
||||||
|
|
||||||
if (empty($phone_info) || empty($phone_info['phone_info']) || empty($phone_info['phone_info']['purePhoneNumber'])) {
|
if (empty($phone_info)){
|
||||||
|
return fail(HttpEnumCode::GET_WX_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($phone_info['phone_info']) || empty($phone_info['phone_info']['purePhoneNumber'])) {
|
||||||
return fail(HttpEnumCode::GET_WX_ERROR);
|
return fail(HttpEnumCode::GET_WX_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取用户openid
|
// 获取用户openid
|
||||||
$wx_info_data = $weChat->codeToSession($wx_code);
|
$wx_info_data = $weChat->codeToSession($wx_code);
|
||||||
|
if (empty($wx_info_data)){
|
||||||
|
return fail(HttpEnumCode::GET_WX_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($wx_info_data['session_key']) || empty($wx_info_data['openid'])) {
|
if (empty($wx_info_data['session_key']) || empty($wx_info_data['openid'])) {
|
||||||
return fail(HttpEnumCode::GET_WX_ERROR);
|
return fail(HttpEnumCode::GET_WX_ERROR);
|
||||||
}
|
}
|
||||||
}catch (\Throwable $e){
|
}catch (\Throwable $e){
|
||||||
|
Log::getInstance("LoginService-wechatMobileLogin")->error($e->getMessage());
|
||||||
return fail(HttpEnumCode::GET_WX_ERROR);
|
return fail(HttpEnumCode::GET_WX_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +96,7 @@ class LoginService extends BaseService
|
|||||||
$data['mobile'] = $phone_info['phone_info']['purePhoneNumber'];
|
$data['mobile'] = $phone_info['phone_info']['purePhoneNumber'];
|
||||||
$data['wx_mobile'] = $phone_info['phone_info']['purePhoneNumber'];
|
$data['wx_mobile'] = $phone_info['phone_info']['purePhoneNumber'];
|
||||||
$data['user_type'] = $user_type;
|
$data['user_type'] = $user_type;
|
||||||
$data['register_method'] = 1;//注册方式(1:小程序授权 2:手机号 )
|
$data['register_method'] = 1;// 注册方式(1:小程序授权 2:手机号)
|
||||||
$data['avatar'] = $avatar;
|
$data['avatar'] = $avatar;
|
||||||
$user = UserModel::addUser($data);
|
$user = UserModel::addUser($data);
|
||||||
if (empty($user)) {
|
if (empty($user)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user