小修改
This commit is contained in:
parent
9083474f86
commit
ccde014fc7
|
@ -85,7 +85,7 @@ class TaskController
|
||||||
if ( !empty($GetLodeLog) &&$GetLodeLog->status == 0) {
|
if ( !empty($GetLodeLog) &&$GetLodeLog->status == 0) {
|
||||||
return ApiResponseApp::success([]);
|
return ApiResponseApp::success([]);
|
||||||
}
|
}
|
||||||
if ($GetLodeLog->status == 1) {
|
if (!empty($GetLodeLog)&&$GetLodeLog->status == 1) {
|
||||||
$GetLodeLog->status = 2;
|
$GetLodeLog->status = 2;
|
||||||
$GetLodeLog->save();
|
$GetLodeLog->save();
|
||||||
return ApiResponseApp::success(['code' => $GetLodeLog->code]);
|
return ApiResponseApp::success(['code' => $GetLodeLog->code]);
|
||||||
|
|
|
@ -40,15 +40,15 @@ class UserController
|
||||||
// 根据手机号查询用户
|
// 根据手机号查询用户
|
||||||
$user = User::where('username', '=', $username)->first();
|
$user = User::where('username', '=', $username)->first();
|
||||||
|
|
||||||
if($user->status==0){
|
|
||||||
return ApiResponseApp::error([],'账号被禁用');
|
|
||||||
}
|
|
||||||
|
|
||||||
// // 如果未找到用户,返回错误
|
// // 如果未找到用户,返回错误
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
return ApiResponseApp::error([],'账号或密码错误');
|
return ApiResponseApp::error([],'账号或密码错误');
|
||||||
}
|
}
|
||||||
|
if($user->status==0){
|
||||||
|
return ApiResponseApp::error([],'账号被禁用');
|
||||||
|
}
|
||||||
// 验证密码是否正确
|
// 验证密码是否正确
|
||||||
if (!password_verify($password, $user->password)) {
|
if (!password_verify($password, $user->password)) {
|
||||||
return ApiResponseApp::error([],'账号或密码错误');
|
return ApiResponseApp::error([],'账号或密码错误');
|
||||||
|
|
Loading…
Reference in New Issue