diff --git a/application/common.php b/application/common.php index 1d9a78efae137bcacf84036a340ceac940110cac..5e68febe86fa61f1a450727427b0e03a49c3c0fe 100755 --- a/application/common.php +++ b/application/common.php @@ -18,12 +18,16 @@ * @version 1.0.0 * @date 2019-08-06 * @desc description - * @param [string] $path [参数字符串 格式如: a/aa/b/bb/c/cc ] * @param [string] $key [指定key] * @param [mixed] $default [默认值] + * @param [string] $path [参数字符串 格式如: a/aa/b/bb/c/cc ] */ -function PathToParams($path, $key = null, $default = null) +function PathToParams($key = null, $default = null, $path = '') { + if(empty($path) && isset($_REQUEST['s'])) + { + $path = $_REQUEST['s']; + } if(!empty($path)) { if(substr($path, 0, 1) == '/') diff --git a/application/service/UeditorService.php b/application/service/UeditorService.php index 2d4e3ac9284a1d83325522b3ad67a46db1382006..9cf262c44c984ec37b20f2601b6a2c6af44ad5aa 100644 --- a/application/service/UeditorService.php +++ b/application/service/UeditorService.php @@ -42,7 +42,7 @@ class UeditorService self::$params = $params; self::$current_config = config('ueditor.'); self::$current_action = isset($params['action']) ? $params['action'] : ''; - self::$path_type = isset($params['path_type']) ? $params['path_type'] : (isset($params['s']) ? PathToParams($params['s'], 'path_type', 'other') : ''); + self::$path_type = isset($params['path_type']) ? $params['path_type'] : PathToParams('path_type', 'other'); // action switch(self::$current_action) diff --git a/application/tags.php b/application/tags.php index e2e9c36d2e8a9b24ad1acf930854e8d3349ef026..15dca883ea687543bfdc95cac6fe4273e6a65a18 100755 --- a/application/tags.php +++ b/application/tags.php @@ -104,14 +104,6 @@ return array ( array ( 0 => 'app\\plugins\\membershiplevelvip\\Hook', ), - 'plugins_service_users_center_left_menu_handle' => - array ( - 0 => 'app\\plugins\\wallet\\Hook', - ), - 'plugins_service_header_navigation_top_right_handle' => - array ( - 0 => 'app\\plugins\\wallet\\Hook', - ), 'plugins_view_goods_detail_photo_within' => array ( 0 => 'app\\plugins\\goodsphototag\\Hook', diff --git a/config/console.php b/config/console.php index 4f81b5ebadf6a4a25f4f0605f163e537c69476c7..443b88dc54209e61f65966782706fc60224ef945 100755 --- a/config/console.php +++ b/config/console.php @@ -13,7 +13,7 @@ // | 控制台配置 // +---------------------------------------------------------------------- return [ - 'name' => 'Think Console', + 'name' => 'ShopXO Console', 'version' => '0.1', 'user' => null, 'auto_path' => env('app_path') . 'command' . DIRECTORY_SEPARATOR, diff --git a/config/ueditor.php b/config/ueditor.php index a56e1e93ad89b56eb85b5d089a091d2743175b77..2d7da7e57e9d143e049fd79489a740859bff8f3c 100644 --- a/config/ueditor.php +++ b/config/ueditor.php @@ -9,15 +9,10 @@ // | Author: Devil // +---------------------------------------------------------------------- -/** - * 百度编辑器配置信息 - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-01T21:51:08+0800 - */ -$params = input(); -$path_type = isset($params['path_type']) ? $params['path_type'] : (isset($params['s']) ? PathToParams($params['s'], 'path_type', 'other') : ''); +// +---------------------------------------------------------------------- +// | 百度编辑器配置信息 +// +---------------------------------------------------------------------- +$config_path_type = PathToParams('path_type', 'other'); return [ // 上传图片配置项 // 执行上传图片的action名称 @@ -45,7 +40,7 @@ return [ 'imageUrlPrefix' => '', // 上传保存路径,可以自定义保存路径和文件名格式 - 'imagePathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.$path_type.'/{yyyy}/{mm}/{dd}/{time}{rand:6}', + 'imagePathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.$config_path_type.'/{yyyy}/{mm}/{dd}/{time}{rand:6}', // 涂鸦图片上传配置项 @@ -56,7 +51,7 @@ return [ 'scrawlFieldName' => 'upfile', // 上传保存路径,可以自定义保存路径和文件名格式 - 'scrawlPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.$path_type.'/{yyyy}/{mm}/{dd}/{time}{rand:6}', + 'scrawlPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.$config_path_type.'/{yyyy}/{mm}/{dd}/{time}{rand:6}', // 上传大小限制,单位B 'scrawlMaxSize' => MyC('home_max_limit_image', 2048000, true), @@ -76,7 +71,7 @@ return [ 'snapscreenActionName' => 'uploadimage', // 上传保存路径,可以自定义保存路径和文件名格式 - 'snapscreenPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.$path_type.'/{yyyy}/{mm}/{dd}/{time}{rand:6}', + 'snapscreenPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.$config_path_type.'/{yyyy}/{mm}/{dd}/{time}{rand:6}', // 图片访问路径前缀 'snapscreenUrlPrefix' => '', @@ -96,7 +91,7 @@ return [ 'catcherFieldName' => 'source', // 上传保存路径,可以自定义保存路径和文件名格式 - 'catcherPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.$path_type.'/{yyyy}/{mm}/{dd}/{time}{rand:6}', + 'catcherPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/images/'.$config_path_type.'/{yyyy}/{mm}/{dd}/{time}{rand:6}', // 图片访问路径前缀 'catcherUrlPrefix' => '', @@ -116,7 +111,7 @@ return [ 'videoFieldName' => 'upfile', // 上传保存路径,可以自定义保存路径和文件名格式 - 'videoPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/video/'.$path_type.'/{yyyy}/{mm}/{dd}/{time}{rand:6}', + 'videoPathFormat' => __MY_ROOT_PUBLIC__.'static/upload/video/'.$config_path_type.'/{yyyy}/{mm}/{dd}/{time}{rand:6}', // 视频访问路径前缀 'videoUrlPrefix' => '', @@ -136,7 +131,7 @@ return [ 'fileFieldName' => 'upfile', // 上传保存路径,可以自定义保存路径和文件名格式 - 'filePathFormat' => __MY_ROOT_PUBLIC__.'static/upload/file/'.$path_type.'/{yyyy}/{mm}/{dd}/{time}{rand:6}', + 'filePathFormat' => __MY_ROOT_PUBLIC__.'static/upload/file/'.$config_path_type.'/{yyyy}/{mm}/{dd}/{time}{rand:6}', // 文件访问路径前缀 'fileUrlPrefix' => '', @@ -153,7 +148,7 @@ return [ 'imageManagerActionName'=> 'listimage', // 指定要列出图片的目录 - 'imageManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/images/'.$path_type.'/', + 'imageManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/images/'.$config_path_type.'/', // 每次列出文件数量 'imageManagerListSize' => 20, @@ -173,7 +168,7 @@ return [ 'fileManagerActionName' => 'listfile', // 指定要列出文件的目录 - 'fileManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/file/'.$path_type.'/', + 'fileManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/file/'.$config_path_type.'/', // 文件访问路径前缀 'fileManagerUrlPrefix' => '', @@ -188,7 +183,7 @@ return [ 'videoManagerActionName' => 'listvideo', // 指定要列出文件的目录 - 'videoManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/video/'.$path_type.'/', + 'videoManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/video/'.$config_path_type.'/', // 文件访问路径前缀 'videoManagerUrlPrefix' => '',