diff --git a/application/admin/config/app.php b/application/admin/config/app.php index 7f3b3c7e1..0d2bd7580 100755 --- a/application/admin/config/app.php +++ b/application/admin/config/app.php @@ -18,6 +18,12 @@ */ return [ + // 默认输出类型 + 'default_return_type' => 'html', + + // 默认AJAX 数据返回格式,可选json xml ... + 'default_ajax_return' => 'json', + // 缓存key列表 // 权限缓存存储key 'cache_admin_power_key' => 'cache_admin_power_', diff --git a/application/api/config/app.php b/application/api/config/app.php index 68fe47c9a..5493af479 100755 --- a/application/api/config/app.php +++ b/application/api/config/app.php @@ -19,11 +19,13 @@ return [ // 默认输出类型 - 'default_return_type' => 'json', + 'default_return_type' => 'json', + // 默认AJAX 数据返回格式,可选json xml ... - 'default_ajax_return' => 'json', + 'default_ajax_return' => 'json', + // 默认JSONP格式返回的处理方法 - 'default_jsonp_handler' => 'jsonpReturn', + 'default_jsonp_handler' => 'jsonpReturn', // 百度编辑器配置信息 ueditor 'ueditor_config' => [ diff --git a/application/index/config/app.php b/application/index/config/app.php index 746ce5c9e..5f4e8e28c 100755 --- a/application/index/config/app.php +++ b/application/index/config/app.php @@ -17,6 +17,16 @@ * @datetime 2016-12-01T21:51:08+0800 */ return [ - 'url_html_suffix' => MyC('home_seo_url_html_suffix', 'html', true), + // 默认输出类型 + 'default_return_type' => 'html', + + // 默认AJAX 数据返回格式,可选json xml ... + 'default_ajax_return' => 'json', + + // 默认JSONP格式返回的处理方法 + 'default_jsonp_handler' => 'jsonpReturn', + + // 伪静态后缀 + 'url_html_suffix' => MyC('home_seo_url_html_suffix', 'html', true), ]; ?> \ No newline at end of file diff --git a/application/index/controller/Plugins.php b/application/index/controller/Plugins.php index 3bbc8ce8b..7ce39d154 100755 --- a/application/index/controller/Plugins.php +++ b/application/index/controller/Plugins.php @@ -125,7 +125,13 @@ class Plugins extends Common return $this->fetch('public/tips_error'); } } - return $obj->$pluginsaction($params); + $ret = $obj->$pluginsaction($params); + if(is_string($ret)) + { + $this->assign('msg', $ret); + return $this->fetch('public/tips_error'); + } + return $ret; } /**