From 01f63041a5900d5028e63552310e5d120b54f8dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 23 Sep 2025 19:03:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=81=E7=A6=81=E7=99=BB=E5=BD=95=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Login.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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];