|
@@ -31,6 +31,15 @@ public class AdminLoginController {
|
|
|
@Operation(summary = "管理员登录", description = "用户名和密码为请求载荷,若登录成功,返回两token")
|
|
|
public JsonResult adminLogin(@RequestBody AdminPojo adminPojo){
|
|
|
|
|
|
+ CaptchaVO captchaVO = new CaptchaVO();
|
|
|
+ captchaVO.setCaptchaType( adminPojo.getCaptchaType() );
|
|
|
+ captchaVO.setPointJson(adminPojo.getPointJson() );
|
|
|
+ captchaVO.setToken( adminPojo.getToken() );
|
|
|
+ ResponseModel response = captchaService.verification(captchaVO);
|
|
|
+ if (!response.isSuccess()) {
|
|
|
+ throw new EasException( response.getRepMsg() , Integer.parseInt(response.getRepCode()));
|
|
|
+ }
|
|
|
+
|
|
|
LoginToken result = adminLoginService.adminLogin(adminPojo);
|
|
|
|
|
|
return JsonResult.data(result);
|
|
@@ -55,16 +64,4 @@ public class AdminLoginController {
|
|
|
return adminLoginService.verifyToJsonResult(captchaService.check(captchaVO));
|
|
|
}
|
|
|
|
|
|
- @PostMapping("/verify.judge")
|
|
|
- @Operation(summary = "二次校验验证码", description = "校验滑动验证码结果,是否匹配上,传参:captchaVerification")
|
|
|
- public JsonResult verify(@RequestBody CaptchaVO captchaVO) {
|
|
|
- ResponseModel response = captchaService.verification(captchaVO);
|
|
|
- if (!response.isSuccess()) {
|
|
|
- throw new EasException( response.getRepMsg() , Integer.parseInt(response.getRepCode()));
|
|
|
- }
|
|
|
- return adminLoginService.verifyToJsonResult(response);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|