|
|
@ -66,7 +66,6 @@ class LoginService extends BaseHomeService |
|
|
|
|
|
|
|
// 返回结果 |
|
|
|
return $this->toData('0', lang('email_send_successfully')); |
|
|
|
|
|
|
|
} catch (ValidateException $validateException) { |
|
|
|
// 参数校验失败 异常类 |
|
|
|
$message = $validateException->getError(); |
|
|
@ -75,7 +74,6 @@ class LoginService extends BaseHomeService |
|
|
|
// 异常情况 |
|
|
|
return $this->toData('500', lang('system_busy'), [$exception->getMessage()]); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -314,7 +312,8 @@ class LoginService extends BaseHomeService |
|
|
|
} |
|
|
|
|
|
|
|
// 用户登陆之后需要进行的操作 异步完成 |
|
|
|
Queue::push('app\home\job\LoginDone', ['userId' => $userId, |
|
|
|
Queue::push('app\home\job\LoginDone', [ |
|
|
|
'userId' => $userId, |
|
|
|
'fields' => [ |
|
|
|
'last_login_time' => date('Y-m-d H:i:s'), |
|
|
|
'ip' => $this->getClientRealIp(), |
|
|
@ -367,6 +366,8 @@ class LoginService extends BaseHomeService |
|
|
|
|
|
|
|
$param['nation'] = trim($param['nation']); |
|
|
|
$param['phone'] = trim($param['phone']); |
|
|
|
//去掉前面0 |
|
|
|
$param['phone'] = ltrim($param['phone'], '0'); |
|
|
|
// 去除国内手机号 |
|
|
|
if ($this->checkForbidNation($param['nation'])) { |
|
|
|
return $this->toData('500', lang('unsupported_country_or_region')); |
|
|
@ -680,7 +681,8 @@ class LoginService extends BaseHomeService |
|
|
|
} |
|
|
|
|
|
|
|
// 用户登陆之后需要进行的操作 异步完成 |
|
|
|
Queue::push('app\home\job\LoginDone', ['userId' => $userId, |
|
|
|
Queue::push('app\home\job\LoginDone', [ |
|
|
|
'userId' => $userId, |
|
|
|
'fields' => [ |
|
|
|
'last_login_time' => date('Y-m-d H:i:s'), |
|
|
|
'ip' => $this->getClientRealIp(), |
|
|
@ -834,7 +836,8 @@ class LoginService extends BaseHomeService |
|
|
|
} |
|
|
|
|
|
|
|
// 用户登陆之后需要进行的操作 异步完成 |
|
|
|
Queue::push('app\home\job\LoginDone', ['userId' => $userId, |
|
|
|
Queue::push('app\home\job\LoginDone', [ |
|
|
|
'userId' => $userId, |
|
|
|
'fields' => [ |
|
|
|
'last_login_time' => date('Y-m-d H:i:s'), |
|
|
|
'ip' => $this->getClientRealIp(), |
|
|
@ -933,7 +936,6 @@ class LoginService extends BaseHomeService |
|
|
|
} catch (\Exception $exception) { |
|
|
|
return $this->toData('500', lang('system_busy')); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
public function testLogin($param): array |
|
|
|
{ |
|
|
@ -977,7 +979,6 @@ class LoginService extends BaseHomeService |
|
|
|
} catch (\Exception $exception) { |
|
|
|
return $this->toData('500', lang('system_busy'), []); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
public function getIP(): array |
|
|
|
{ |
|
|
|