Commit 5f5c0333 by LiuJunYi

手机号修改重复问题

parent 079ef47a
...@@ -120,7 +120,9 @@ class User extends AuthBase ...@@ -120,7 +120,9 @@ class User extends AuthBase
{ {
if(request()->isAjax()){ if(request()->isAjax()){
try{ try{
\app\common\model\User::update(input('post.')); $data = input('post.');
$data['phone'] = $data['phone']?:null;
\app\common\model\User::update($data);
}catch (Exception $e){ }catch (Exception $e){
return json(['code'=>1,'msg'=>'手机号重复,修改失败']); return json(['code'=>1,'msg'=>'手机号重复,修改失败']);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment