mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-26 04:58:10 +00:00
Update AuthService.php
This commit is contained in:
parent
f95d27974c
commit
e2bad6b9f6
@ -77,6 +77,9 @@ class AuthService extends BaseApiService
|
|||||||
$phone_info = $result['phone_info'];
|
$phone_info = $result['phone_info'];
|
||||||
$mobile = $phone_info['purePhoneNumber'];
|
$mobile = $phone_info['purePhoneNumber'];
|
||||||
if(empty($mobile)) throw new ApiException('WECHAT_EMPOWER_NOT_EXIST');
|
if(empty($mobile)) throw new ApiException('WECHAT_EMPOWER_NOT_EXIST');
|
||||||
|
}else{
|
||||||
|
//todo 校验手机号验证码
|
||||||
|
(new LoginService())->checkMobileCode($mobile);
|
||||||
}
|
}
|
||||||
$member_service = new MemberService();
|
$member_service = new MemberService();
|
||||||
$member = $member_service->findMemberInfo(['member_id' => $this->member_id, 'site_id' => $this->site_id]);
|
$member = $member_service->findMemberInfo(['member_id' => $this->member_id, 'site_id' => $this->site_id]);
|
||||||
@ -88,9 +91,7 @@ class AuthService extends BaseApiService
|
|||||||
$mobile_member = $member_service->findMemberInfo(['mobile' => $mobile, 'site_id' => $this->site_id]);
|
$mobile_member = $member_service->findMemberInfo(['mobile' => $mobile, 'site_id' => $this->site_id]);
|
||||||
if(!$mobile_member->isEmpty()) throw new AuthException('MOBILE_IS_EXIST');
|
if(!$mobile_member->isEmpty()) throw new AuthException('MOBILE_IS_EXIST');
|
||||||
|
|
||||||
if(empty($mobile)) throw new AuthException('MOBILE_NEEDED');//必须填写
|
// if(empty($mobile)) throw new AuthException('MOBILE_NEEDED');//必须填写
|
||||||
//todo 校验手机号验证码
|
|
||||||
(new LoginService())->checkMobileCode($mobile);
|
|
||||||
$member->save([
|
$member->save([
|
||||||
'mobile' => $mobile
|
'mobile' => $mobile
|
||||||
]);
|
]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user