Commit 43e050c5 by ZhangYunfei

增加登录时图形验证码校验

parent 9cd35792
...@@ -51,11 +51,11 @@ public class LogLoginController { ...@@ -51,11 +51,11 @@ public class LogLoginController {
@Login @Login
// @RequiresPermissions("manage:member:list") // @RequiresPermissions("manage:member:list")
public R login(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){ public R login(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
/*DomesticCodeVo domesticCodeVo = new DomesticCodeVo(); DomesticCodeVo domesticCodeVo = new DomesticCodeVo(params.get("uuid").toString(),params.get("captcha").toString());
boolean captcha = sysCaptchaService.validate(domesticCodeVo.getUuid(), domesticCodeVo.getCaptcha()); boolean captcha = sysCaptchaService.validate(domesticCodeVo.getUuid(), domesticCodeVo.getCaptcha());
if(!captcha){ if(!captcha){
return R.error("验证码不正确"); return R.error("验证码不正确");
}*/ }
return R.ok().put("data",logLoginService.login(params,request,response)); return R.ok().put("data",logLoginService.login(params,request,response));
} }
......
...@@ -17,6 +17,11 @@ public class DomesticCodeVo implements Serializable { ...@@ -17,6 +17,11 @@ public class DomesticCodeVo implements Serializable {
private String captcha; private String captcha;
private String uuid; private String uuid;
public DomesticCodeVo(String captcha, String uuid) {
this.captcha = captcha;
this.uuid = uuid;
}
private String type; private String type;
private String code; private String code;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment