lc895296059@163.com 4 gadi atpakaļ
vecāks
revīzija
fb04d068c5

+ 2 - 1
src/main/java/com/yc/education/controller/IndexController.java

@@ -104,9 +104,10 @@ public class IndexController {
      */
     @RequestMapping(value = {""})
     public ModelAndView wx(HttpSession session) {
-        return new ModelAndView("redirect:https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + appid + "&redirect_uri=http%3a%2f%2fshjieguan.com%2fwxlogin%2fwxresult&response_type=code&scope=snsapi_userinfo&state=" + appid + "_0&component_appid=" + COMPONENT_APPID + "#wechat_redirect");
+       // return new ModelAndView("redirect:https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + appid + "&redirect_uri=http%3a%2f%2fshjieguan.com%2fwxlogin%2fwxresult&response_type=code&scope=snsapi_userinfo&state=" + appid + "_0&component_appid=" + COMPONENT_APPID + "#wechat_redirect");
 //        ModelAndView result = new ModelAndView();
 //        return result;
+        return null;
     }
 
     /**

+ 8 - 1
src/main/webapp/WEB-INF/jsp/change_phone.jsp

@@ -66,14 +66,18 @@
      * @returns {boolean}
      */
     function sendsmg() {
+        $(".get_codes").removeAttr("onclick");
         var phone = $("#phone").val();
         if (phone == null || phone == '') {
             layer.msg("请输入手机号码");
             return false;
         } else {
             $.post("sendsms.html", {"phone": phone}, function (data) {
+                if(!data.is){
+                    layer.msg("该手机号已被限流,限流规则:一条/分钟,5条/小时,10条/天!", {icon: 0, time: 5000});
+                }
+            },"json");
 
-            });
             interval = setInterval(function () {
                 if (seconds > 0) {
                     seconds--;
@@ -81,15 +85,18 @@
                     $(".get_codes").attr("disabled", true)
                 } else {
                     clearInterval(interval)
+                    $(".get_codes").attr("onclick","sendsmg()");
                     $(".get_codes").text('重新获取');
                     $(".get_codes").attr("disabled", false)
                     seconds = 60;
                 }
             }, 1000)
+
         }
     }
 
 
+
     /**
      * 表单提交
      */

+ 27 - 22
src/main/webapp/WEB-INF/jsp/guy_auction.jsp

@@ -101,31 +101,36 @@
     // proxy_subsuces
 
     function sendsmg() {
-        if (seconds > 59 || seconds < 1) {
-            var phone = $("#phone").val();
-            if (phone == null || phone == '') {
-                layer.msg("请输入手机号码");
-                return false;
-            } else {
-                $.post("sendsms.html", {"phone": phone}, function (data) {
-
-                });
-                interval = setInterval(function () {
-                    if (seconds > 0) {
-                        seconds--;
-                        $(".get_codes").text(seconds + 's');
-                        $(".get_codes").attr("disabled", true)
-                    } else {
-                        clearInterval(interval)
-                        $(".get_codes").text('重新获取');
-                        $(".get_codes").attr("disabled", false)
-                        seconds = 60;
-                    }
-                }, 1000)
-            }
+        $(".get_codes").removeAttr("onclick");
+        var phone = $("#phone").val();
+        if (phone == null || phone == '') {
+            layer.msg("请输入手机号码");
+            return false;
+        } else {
+            $.post("sendsms.html", {"phone": phone}, function (data) {
+                if(!data.is){
+                    layer.msg("该手机号已被限流,限流规则:一条/分钟,5条/小时,10条/天!", {icon: 0, time: 5000});
+                }
+            },"json");
+
+            interval = setInterval(function () {
+                if (seconds > 0) {
+                    seconds--;
+                    $(".get_codes").text(seconds + 's');
+                    $(".get_codes").attr("disabled", true)
+                } else {
+                    clearInterval(interval)
+                    $(".get_codes").attr("onclick","sendsmg()");
+                    $(".get_codes").text('重新获取');
+                    $(".get_codes").attr("disabled", false)
+                    seconds = 60;
+                }
+            }, 1000)
+
         }
     }
 
+
     /**
      * 表单提交
      */

+ 26 - 21
src/main/webapp/WEB-INF/jsp/login.jsp

@@ -74,31 +74,36 @@
     var interval;
 
     function sendsmg() {
-        if (seconds > 59 || seconds < 1) {
-            var phone = $("#phone").val();
-            if (phone == null || phone == '') {
-                layer.msg("请输入手机号码");
-                return false;
-            } else {
-                $.post("sendsms.html", {"phone": phone}, function (data) {
+        $(".get_codes").removeAttr("onclick");
+        var phone = $("#phone").val();
+        if (phone == null || phone == '') {
+            layer.msg("请输入手机号码");
+            return false;
+        } else {
+            $.post("sendsms.html", {"phone": phone}, function (data) {
+                if(!data.is){
+                    layer.msg("该手机号已被限流,限流规则:一条/分钟,5条/小时,10条/天!", {icon: 0, time: 5000});
+                }
+            },"json");
+
+            interval = setInterval(function () {
+                if (seconds > 0) {
+                    seconds--;
+                    $(".get_codes").text(seconds + 's');
+                    $(".get_codes").attr("disabled", true)
+                } else {
+                    clearInterval(interval)
+                    $(".get_codes").attr("onclick","sendsmg()");
+                    $(".get_codes").text('重新获取');
+                    $(".get_codes").attr("disabled", false)
+                    seconds = 60;
+                }
+            }, 1000)
 
-                });
-                interval = setInterval(function () {
-                    if (seconds > 0) {
-                        seconds--;
-                        $(".get_codes").text(seconds + 's');
-                        $(".get_codes").attr("disabled", true)
-                    } else {
-                        clearInterval(interval)
-                        $(".get_codes").text('重新获取');
-                        $(".get_codes").attr("disabled", false)
-                        seconds = 60;
-                    }
-                }, 1000)
-            }
         }
     }
 
+
     /**
      * 表单提交
      */

+ 9 - 2
src/main/webapp/WEB-INF/jsp/select_code.jsp

@@ -140,14 +140,18 @@
      * @returns {boolean}
      */
     function sendsmg() {
+        $(".get_codes").removeAttr("onclick");
         var phone = $("#phone").val();
         if (phone == null || phone == '') {
             layer.msg("请输入手机号码");
             return false;
         } else {
             $.post("sendsms.html", {"phone": phone}, function (data) {
+                if(!data.is){
+                    layer.msg("该手机号已被限流,限流规则:一条/分钟,5条/小时,10条/天!", {icon: 0, time: 5000});
+                }
+            },"json");
 
-            });
             interval = setInterval(function () {
                 if (seconds > 0) {
                     seconds--;
@@ -155,15 +159,18 @@
                     $(".get_codes").attr("disabled", true)
                 } else {
                     clearInterval(interval)
-                    $(".get_codes").text('重新获取验证码');
+                    $(".get_codes").attr("onclick","sendsmg()");
+                    $(".get_codes").text('重新获取');
                     $(".get_codes").attr("disabled", false)
                     seconds = 60;
                 }
             }, 1000)
+
         }
     }
 
 
+
     function submits() {
         var code = $("#codes").val();
         var name = $("#name").val();

+ 9 - 1
src/main/webapp/WEB-INF/jsp/year_inspec.jsp

@@ -151,14 +151,18 @@
     var interval;
 
     function sendsmg() {
+        $(".get_codes").removeAttr("onclick");
         var phone = $("#phone").val();
         if (phone == null || phone == '') {
             layer.msg("请输入手机号码");
             return false;
         } else {
             $.post("sendsms.html", {"phone": phone}, function (data) {
+                if(!data.is){
+                    layer.msg("该手机号已被限流,限流规则:一条/分钟,5条/小时,10条/天!", {icon: 0, time: 5000});
+                }
+            },"json");
 
-            });
             interval = setInterval(function () {
                 if (seconds > 0) {
                     seconds--;
@@ -166,13 +170,17 @@
                     $(".get_codes").attr("disabled", true)
                 } else {
                     clearInterval(interval)
+                    $(".get_codes").attr("onclick","sendsmg()");
                     $(".get_codes").text('重新获取');
                     $(".get_codes").attr("disabled", false)
+                    seconds = 60;
                 }
             }, 1000)
+
         }
     }
 
+
     /**
      * 表单提交
      */