Pu Zhibing
2024-09-29 adf2ede692b76cf95d0cec80f4087e52d760b219
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/KaptchaController.java
@@ -29,7 +29,7 @@
 * @date 2017-05-05 23:10
 */
@Controller
@RequestMapping("/kaptcha")
@RequestMapping("/base/kaptcha")
public class KaptchaController {
    @Autowired
@@ -47,13 +47,13 @@
     */
    @RequestMapping("")
    public void index(HttpServletRequest request, HttpServletResponse response,String phone) {
//        String substring = phone.substring(0, 1);
//        if("0".equals(substring)){
//            phone = "233" + phone.substring(1);
//        }
//        if(phone.indexOf("233") < 0){
//            phone = "233" + phone;
//        }
        String substring = phone.substring(0, 1);
        if("0".equals(substring)){
            phone = "233" + phone.substring(1);
        }
        if(phone.indexOf("233") < 0){
            phone = "233" + phone;
        }
        HttpSession session = request.getSession();
@@ -76,7 +76,7 @@
        // store the text in the session
        session.setAttribute(Constants.KAPTCHA_SESSION_KEY, capText);
//        redisUtil.setStrValue(phone+"_Code",capText);
        redisUtil.setStrValue(phone+"_Code",capText);
        // create the image with the text
        Properties properties = new Properties();