去除修改失败情况下问题

This commit is contained in:
wucongxing 2023-03-23 16:25:57 +08:00
parent e2486d8047
commit 9dd6116f44
2 changed files with 7 additions and 6 deletions

View File

@ -35,7 +35,12 @@ class LoginController extends AbstractController
return $this->response->json($data);
}
// 手机号登陆
/**
* 手机号登陆
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function mobileLogin(): ResponseInterface
{
// 验证参数

View File

@ -384,11 +384,7 @@ class LoginService extends BaseService
$data = array();
$data['login_ip'] = $login_ip ?? "";
$data['last_login_at'] = date('Y-m-d H:i:s', time());
$res = UserModel::editUser($params,$data);
if (!$res){
Db::rollBack();
return fail(HttpEnumCode::SERVER_ERROR);
}
UserModel::editUser($params,$data);
// 组合生成token的数据
$token_user_data = array();