|
|
@@ -17,9 +17,9 @@ import com.uas.sso.logging.RegisterBufferedLogger;
|
|
|
import com.uas.sso.service.AppService;
|
|
|
import com.uas.sso.service.PersonalAccountService;
|
|
|
import com.uas.sso.service.UserService;
|
|
|
+import com.uas.sso.util.CaptchaUtil;
|
|
|
import com.uas.sso.util.IpUtils;
|
|
|
import com.uas.sso.util.PasswordLevelUtils;
|
|
|
-import com.uas.sso.foreign.weixin.entity.OAuthInfo;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -32,7 +32,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
import java.net.URLDecoder;
|
|
|
-import java.net.URLEncoder;
|
|
|
import java.util.List;
|
|
|
import java.util.Optional;
|
|
|
|
|
|
@@ -59,6 +58,11 @@ public class PersonalRegisterController extends BaseController {
|
|
|
|
|
|
private final static Logger LOGGER = LoggerFactory.getLogger(PersonalRegisterController.class);
|
|
|
|
|
|
+ /**
|
|
|
+ * 验证码存session的可以
|
|
|
+ */
|
|
|
+ private static final String RESET_CAPTCHA = "resetCaptcha";
|
|
|
+
|
|
|
/**
|
|
|
* 注册个人信息
|
|
|
*
|
|
|
@@ -168,12 +172,15 @@ public class PersonalRegisterController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/checkCode", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public ModelMap getCode(String mobile) {
|
|
|
+ public ModelMap getCode(String mobile, String code) {
|
|
|
// 参数校验
|
|
|
if (StringUtils.isEmpty(mobile)) {
|
|
|
return error("请输入手机号");
|
|
|
}
|
|
|
|
|
|
+ // 校验图片验证码
|
|
|
+ CaptchaUtil.checkCode(request, RESET_CAPTCHA, code);
|
|
|
+
|
|
|
// 获取验证码
|
|
|
String token = getMobileToken(mobile);
|
|
|
|