diff --git a/application/admin/controller/Common.php b/application/admin/controller/Common.php index 6dbd4e079..b1eb6643e 100755 --- a/application/admin/controller/Common.php +++ b/application/admin/controller/Common.php @@ -13,6 +13,7 @@ namespace app\admin\controller; use think\Controller; use app\service\AdminPowerService; use app\service\ConfigService; +use app\service\OtherService; /** * 管理员公共控制器 @@ -59,8 +60,28 @@ class Common extends Controller // 视图初始化 $this->ViewInit(); + + // 其它处理 + $this->OtherHandle(); } + /** + * 其它处理 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-12-07 + * @desc description + */ + private function OtherHandle() + { + $ret = OtherService::EnvironmentCheck(); + if($ret['code'] != 0) + { + exit(json_encode($ret)); + } + } + /** * 系统初始化 * @author Devil diff --git a/application/api/controller/Common.php b/application/api/controller/Common.php index 2be7986dc..3afd71326 100755 --- a/application/api/controller/Common.php +++ b/application/api/controller/Common.php @@ -13,6 +13,7 @@ namespace app\api\controller; use think\Controller; use app\service\ConfigService; use app\service\UserService; +use app\service\OtherService; /** * 接口公共控制器 @@ -60,7 +61,27 @@ class Common extends Controller // 公共数据初始化 $this->CommonInit(); - } + + // 其它处理 + $this->OtherHandle(); + } + + /** + * 其它处理 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-12-07 + * @desc description + */ + private function OtherHandle() + { + $ret = OtherService::EnvironmentCheck(); + if($ret['code'] != 0) + { + exit(json_encode($ret)); + } + } /** * 系统初始化 diff --git a/application/index/controller/Common.php b/application/index/controller/Common.php index bf575f593..863c1c260 100755 --- a/application/index/controller/Common.php +++ b/application/index/controller/Common.php @@ -18,6 +18,7 @@ use app\service\MessageService; use app\service\SearchService; use app\service\ConfigService; use app\service\LinkService; +use app\service\OtherService; /** * 前端公共控制器 @@ -64,6 +65,26 @@ class Common extends Controller // 视图初始化 $this->ViewInit(); + + // 其它处理 + $this->OtherHandle(); + } + + /** + * 其它处理 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-12-07 + * @desc description + */ + private function OtherHandle() + { + $ret = OtherService::EnvironmentCheck(); + if($ret['code'] != 0) + { + exit(json_encode($ret)); + } } /** diff --git a/application/service/OtherService.php b/application/service/OtherService.php new file mode 100644 index 000000000..3d2ce47be --- /dev/null +++ b/application/service/OtherService.php @@ -0,0 +1,45 @@ += $max_input_vars) + { + return DataReturn('请求参数数量已超出php.ini限制[max_input_vars]', -1000); + } + } + + return DataReturn('success', 0); + } +} +?> \ No newline at end of file diff --git a/config/app.php b/config/app.php index 71ead2847..ccb15cfab 100755 --- a/config/app.php +++ b/config/app.php @@ -137,7 +137,7 @@ return [ 'exception_tmpl' => Env::get('think_path') . 'tpl/think_exception.tpl', // 错误显示信息,非调试模式有效 - 'error_message' => '页面错误!请稍后再试~', + 'error_message' => '系统出现错误、请联系管理员或到ShopXO社区查阅~', // 显示错误信息 'show_error_msg' => false, // 异常处理handle类 留空使用 \think\exception\Handle diff --git a/thinkphp/tpl/think_exception.tpl b/thinkphp/tpl/think_exception.tpl index c3fa0d4c9..277b22132 100755 --- a/thinkphp/tpl/think_exception.tpl +++ b/thinkphp/tpl/think_exception.tpl @@ -280,6 +280,9 @@ pre.prettyprint .atv { color: #080 } /* a markup attribute value */ pre.prettyprint .dec, pre.prettyprint .var { color: #606 } /* a declaration; a variable name */ pre.prettyprint .fun { color: red } /* a function name */ + + /* shopxo */ + .shopxo-ask { margin-left: 15px; }
@@ -410,8 +413,9 @@