diff --git a/application/api/model/Login.php b/application/api/model/Login.php index 22e6f84..ff108af 100644 --- a/application/api/model/Login.php +++ b/application/api/model/Login.php @@ -265,10 +265,13 @@ class Login extends Model return ['code' => 0, 'msg' => '密码不能为空', 'data' => null]; } - $user_info = model('User')->where(['mobile' => $user_name,'status'=>1])->find(); + $user_info = model('User')->where(['mobile' => $user_name,'status'=>['<>',0]])->find(); if (empty($user_info)) { return ['code' => 0, 'msg' => '用户不存在', 'data' => null]; } + if ($user_info['status'] != 1) { + return ['code' => 301, 'msg' => '用户被禁用,请联系管理员', 'data' => null]; + } if (md5($password) != $user_info['password']) { return ['code' => 0, 'msg' => '密码错误', 'data' => null];