提交 13fb0826 编写于 作者: dong.an's avatar dong.an

图形验证码

上级 78f3a0ea
流水线 #13050 已失败 于阶段
......@@ -54,10 +54,10 @@ public class AccountController extends AccountBaseController {
@GetMapping("/authCode")
public PicaResponse<String> getAuthCode(@ApiParam(value = "手机号", required = true) @RequestParam("mobilePhone") String mobilePhone,
@ApiParam(value = "验证码类型 0默认 1注册 2修改密码 4微信登录绑定手机 5修改手机 6重置密码") @RequestParam(value = "flag", defaultValue = "0") String flag,
@ApiParam(value = "图形验证码token", required = true) @RequestParam("token") String token,
@ApiParam(value = "图形验证码答案", required = true) @RequestParam("answer") String answer) {
@ApiParam(value = "图形验证码token", required = true) @RequestParam("captchaToken") String captchaToken,
@ApiParam(value = "图形验证码答案", required = true) @RequestParam("captchaAnswer") String captchaAnswer) {
//校验图形验证码
if (!captchaService.acknowledge(token, answer)) {
if (!captchaService.acknowledge(captchaToken, captchaAnswer)) {
return PicaResponse.toResponse(null, PicaResultCode.PARAM_IS_INVALID.code(), "图形验证码答案错误!");
}
this.checkMobilePhone(mobilePhone);
......
......@@ -34,6 +34,7 @@ public class CaptchaController {
return PicaResponse.toResponse(captchaToken);
}
/*
@ApiOperation("校验图形验证码")
@GetMapping("/acknowledge")
public PicaResponse<Boolean> acknowledge(@ApiParam("token") @RequestParam("token") String token,
......@@ -41,5 +42,6 @@ public class CaptchaController {
boolean valid = captchaService.acknowledge(token, answer);
return PicaResponse.toResponse(valid);
}
*/
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册