diff --git a/application/api/model/Login.php b/application/api/model/Login.php index 5881670..c8ab38a 100644 --- a/application/api/model/Login.php +++ b/application/api/model/Login.php @@ -262,17 +262,17 @@ class Login extends Model if (md5($password) != $user_info['password']) { return ['code' => 0, 'msg' => '密码错误', 'data' => null]; } - $multi_user = []; - //查询手机号绑定的账号 - $phone_user = $this->phone_login_query($user_name); - if($phone_user['code'] == 1){ - //获取返回数据的长度 - if(count($phone_user['data']) >= 2){ - $multi_user = $phone_user['data']; - } - } +// $multi_user = []; +// //查询手机号绑定的账号 +// $phone_user = $this->phone_login_query($user_name); +// if($phone_user['code'] == 1){ +// //获取返回数据的长度 +// if(count($phone_user['data']) >= 2){ +// $multi_user = $phone_user['data']; +// } +// } - $login = $this->login($user_info,$system,$login_device,$multi_user); + $login = $this->login($user_info,$system,$login_device); if($login['code'] != 1){ return $login; } diff --git a/application/api/model/UserData.php b/application/api/model/UserData.php index 5b60a02..4fe278b 100644 --- a/application/api/model/UserData.php +++ b/application/api/model/UserData.php @@ -260,7 +260,7 @@ class UserData extends Model db::startTrans(); //修改实名手机号 $red = db::name('user_auth')->where(['id' => $is_real['id']])->update(['mobile' => $new_mobile]); - $reslut = db::name('user')->where(['id' => $user_id])->update(['username' => $new_mobile]); + $reslut = db::name('user')->where(['id' => $user_id])->update(['username' => $new_mobile,'mobile' => $new_mobile]); if ($reslut && $red) { Db::commit(); return ['code' => 1, 'msg' => '修改成功','data' =>null]; @@ -269,7 +269,7 @@ class UserData extends Model return ['code' => 0, 'msg' => '修改失败','data' =>null]; } }else{ - $reslut = db::name('user')->where(['id' => $user_id])->update(['username' => $new_mobile]); + $reslut = db::name('user')->where(['id' => $user_id])->update(['username' => $new_mobile,'mobile' => $new_mobile]); if ($reslut) { return ['code' => 1, 'msg' => '修改成功','data' =>null]; }