Commit ee754759 authored by 李健华's avatar 李健华

手机号验证兼容历史版本

parent a698fc1f
......@@ -48,9 +48,16 @@ public class NewCaptchaController {
public JsonResult getCaptcha(String phoneNo, String clientType, String settingType, HttpServletRequest request) {
String remoteIp = IpUtil.getRemoteIP(request);
log.info("获取验证码, phoneNo:{}, clientType:{}, ip:{}, verifyType-qg:{}", phoneNo, clientType, remoteIp, geetestClose);
if (StringUtils.isNotBlank(phoneNo) || !ValidationUtil.validatePhoneNo(phoneNo)) {
if (StringUtils.isNotBlank(phoneNo) && !ValidationUtil.validatePhoneNo(phoneNo)) {
return JsonResult.buildErrorStateResult("手机号格式错误", null);
}
if (settingType != null) {
if (StringUtils.isNotBlank(phoneNo) || !ValidationUtil.validatePhoneNo(phoneNo)) {
return JsonResult.buildErrorStateResult("手机号格式错误", null);
}
}
// 唯一key,用于初始化极验
String key = StringUtils.isNotBlank(phoneNo) ? phoneNo.trim() : UUID.randomUUID().toString();
// key指纹
......
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