...
|
...
|
@@ -72,7 +72,7 @@ class User extends Api |
|
|
if(empty($data['card'])){
|
|
|
$data['card'] = '';
|
|
|
}
|
|
|
if(empty($data['phone'])){
|
|
|
if(empty($data['mobile'])){
|
|
|
$data['phone'] = '';
|
|
|
}
|
|
|
if(empty($data['work_address'])){
|
...
|
...
|
@@ -115,6 +115,10 @@ class User extends Api |
|
|
$code = $this->request->param('code');
|
|
|
$image = $this->request->param('image');
|
|
|
if(!empty($phone)){
|
|
|
$have_mobile = Db::name('user')->where('mobile', $phone)->where('id', '<>', $user_id)->find();
|
|
|
if($have_mobile){
|
|
|
$this->error('手机号已存在');
|
|
|
}
|
|
|
if(empty($code)){
|
|
|
$this->error('验证码不能为空');
|
|
|
}
|
...
|
...
|
@@ -129,6 +133,7 @@ class User extends Api |
|
|
$params['sex'] = $sex;
|
|
|
}
|
|
|
if($phone){
|
|
|
$params['mobile'] = $phone;
|
|
|
$params['phone'] = $phone;
|
|
|
}
|
|
|
if(empty($data['image']) && $image){
|
...
|
...
|
@@ -253,7 +258,7 @@ class User extends Api |
|
|
}
|
|
|
|
|
|
$user_info = Db::name('user')->where('id',$user_id)->find();
|
|
|
if(empty($user_info['image']) || empty($user_info['phone'])){
|
|
|
if(empty($user_info['image']) || empty($user_info['mobile'])){
|
|
|
$this->error('请先完善个人信息');
|
|
|
}
|
|
|
|
...
|
...
|
|