diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index 772e4e842..69d5b8ec2 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -448,7 +448,9 @@ class BaseController extends HomeController $count = Redis::incr($key); if ($count > 60) { Log::write('user_access_limit:' . date('Y-m-d H:i:s') . ' ' . $key . '[' . $url . ']', 'INFO'); - die('请求太频繁,请稍后再试!'); + $this->assign("ttl",Redis::ttl($key)); + $this->display("index/accessLimit"); + die(); } } else { Redis::incr($key); diff --git a/Application/Home/View/default/Index/accessLimit.html b/Application/Home/View/default/Index/accessLimit.html new file mode 100644 index 000000000..f161fcac9 --- /dev/null +++ b/Application/Home/View/default/Index/accessLimit.html @@ -0,0 +1,176 @@ + + + + + + + + + + + +
+
+
+
+

当前用户存在异常访问行为:【操作太频繁】,请等待{$ttl}s后重试

+
+
+ +
+ + + + \ No newline at end of file diff --git a/Public/Home/images/20170913/optionlimit.png b/Public/Home/images/20170913/optionlimit.png new file mode 100644 index 000000000..f5a9dc87d Binary files /dev/null and b/Public/Home/images/20170913/optionlimit.png differ