src/main/java/com/yeshi/buwan/util/StringUtil.java
@@ -40,9 +40,7 @@ Matcher m = p.matcher(mobile); if (mobile == null || mobile.equals("") || mobile.length() != 11) { return false; } else { return m.find(); } @@ -88,9 +86,13 @@ * @return */ public static String getVerifyCode() { return getNumberVerifyCode(6); } public static String getNumberVerifyCode(int number) { String sts = "0123456789"; String code = ""; for (int i = 0; i < 6; i++) { for (int i = 0; i < number; i++) { int p = (int) (Math.random() * 10); code += sts.charAt(p); }