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

手机号验证

parent 46910c79
...@@ -48,7 +48,7 @@ public class NewCaptchaController { ...@@ -48,7 +48,7 @@ public class NewCaptchaController {
public JsonResult getCaptcha(String phoneNo, String clientType, String settingType, HttpServletRequest request) { public JsonResult getCaptcha(String phoneNo, String clientType, String settingType, HttpServletRequest request) {
String remoteIp = IpUtil.getRemoteIP(request); String remoteIp = IpUtil.getRemoteIP(request);
log.info("获取验证码, phoneNo:{}, clientType:{}, ip:{}, verifyType-qg:{}", phoneNo, clientType, remoteIp, geetestClose); 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); return JsonResult.buildErrorStateResult("手机号格式错误", null);
} }
// 唯一key,用于初始化极验 // 唯一key,用于初始化极验
...@@ -91,7 +91,7 @@ public class NewCaptchaController { ...@@ -91,7 +91,7 @@ public class NewCaptchaController {
public JsonResult getCaptchaPasswd(String phoneNo, String clientType, String settingType, HttpServletRequest request) { public JsonResult getCaptchaPasswd(String phoneNo, String clientType, String settingType, HttpServletRequest request) {
String remoteIp = IpUtil.getRemoteIP(request); String remoteIp = IpUtil.getRemoteIP(request);
log.info("获取验证码, phoneNo:{}, clientType:{}, ip:{}, verifyType-qg:{}", phoneNo, clientType, remoteIp, geetestClose); 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); return JsonResult.buildErrorStateResult("手机号格式错误", null);
} }
// 唯一key,用于初始化极验 // 唯一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