|
|
@@ -39,7 +39,7 @@ class Login extends Manager
|
|
|
// 查询用户
|
|
|
$admin = $AdminUser->orWhere('username', $username)->first(['uid', 'username', 'phone', 'status', 'password', 'insert_time', 'update_time']);
|
|
|
// 用户不存在
|
|
|
- if (!$admin || $admin['status']) return json_send(['code' => 'error', 'msg' => '密码错误或账号不存在']);
|
|
|
+ if (!$admin) return json_send(['code' => 'error', 'msg' => '密码错误或账号不存在']);
|
|
|
// 用户不存在
|
|
|
if ($admin['status']) return json_send(['code' => 'error', 'msg' => '该账号已停用']);
|
|
|
// 转数组
|
|
|
@@ -57,7 +57,7 @@ class Login extends Manager
|
|
|
} else {
|
|
|
$admin = $EmployeeModel->where('employee_code', $username)->first(['id as uid', 'name as username', 'mobile as phone', 'status', 'password', 'insert_time', 'update_time']);
|
|
|
// 用户不存在
|
|
|
- if (!$admin || $admin['status']) return json_send(['code' => 'error', 'msg' => '密码错误或账号不存在']);
|
|
|
+ if (!$admin) return json_send(['code' => 'error', 'msg' => '密码错误或账号不存在']);
|
|
|
// 用户不存在
|
|
|
if ($admin['status']) return json_send(['code' => 'error', 'msg' => '该账号已停用']);
|
|
|
// 转数组
|
|
|
@@ -128,7 +128,7 @@ class Login extends Manager
|
|
|
// 查询用户
|
|
|
$admin = $EmployeeModel->where('mobile', $phone)->first(['id as uid', 'name as username', 'mobile as phone', 'status', 'password', 'insert_time', 'update_time']);
|
|
|
// 用户不存在
|
|
|
- if (!$admin || $admin['status']) return json_send(['code' => 'error', 'msg' => '密码错误或账号不存在']);
|
|
|
+ if (!$admin) return json_send(['code' => 'error', 'msg' => '密码错误或账号不存在']);
|
|
|
// 用户不存在
|
|
|
if ($admin['status']) return json_send(['code' => 'error', 'msg' => '该账号已停用']);
|
|
|
// 转数组
|