|
@@ -36,7 +36,7 @@ class LoginController extends AbstractController
|
|
|
private $userServiceClient;
|
|
|
public function login(Jwt $jwt)
|
|
|
{
|
|
|
- $this->logger->info("验证之前");
|
|
|
+ // $this->logger->info("验证之前");
|
|
|
$reqData = $this->request->all();
|
|
|
$validator = $this->validationFactory->make($reqData, ['username' => 'required', 'password' => 'required', 'type' => 'required'], ['username.required' => '用户名不能为空', 'password.required' => '密码不能为空', 'type.required' => '登录方式必填']);
|
|
|
if ($validator->fails()) {
|
|
@@ -60,12 +60,12 @@ class LoginController extends AbstractController
|
|
|
//密码登录
|
|
|
$where = ['user_name' => $reqData['username']];
|
|
|
}
|
|
|
- $this->logger->info("验证之前");
|
|
|
+ // $this->logger->info("验证之前");
|
|
|
$userInfos = $this->userServiceClient->verifyUserInfo($where);
|
|
|
if ($userInfos['code'] == 0) {
|
|
|
return Result::error("用户名或密码错误");
|
|
|
}
|
|
|
- $this->logger->info("验证用户返回值:", $userInfos);
|
|
|
+ // $this->logger->info("验证用户返回值:", $userInfos);
|
|
|
if (md5(md5($reqData['password']) . $userInfos['data']['salt']) != $userInfos['data']['password']) {
|
|
|
return Result::error("用户名或密码错误");
|
|
|
}
|