提交 af0c84c5 编写于 作者: G gongfuxiang

附件配置细节优化

上级 b607ca2c
...@@ -18,12 +18,16 @@ ...@@ -18,12 +18,16 @@
* @version 1.0.0 * @version 1.0.0
* @date 2019-08-06 * @date 2019-08-06
* @desc description * @desc description
* @param [string] $path [参数字符串 格式如: a/aa/b/bb/c/cc ]
* @param [string] $key [指定key] * @param [string] $key [指定key]
* @param [mixed] $default [默认值] * @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(!empty($path))
{ {
if(substr($path, 0, 1) == '/') if(substr($path, 0, 1) == '/')
......
...@@ -42,7 +42,7 @@ class UeditorService ...@@ -42,7 +42,7 @@ class UeditorService
self::$params = $params; self::$params = $params;
self::$current_config = config('ueditor.'); self::$current_config = config('ueditor.');
self::$current_action = isset($params['action']) ? $params['action'] : ''; 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 // action
switch(self::$current_action) switch(self::$current_action)
......
...@@ -104,14 +104,6 @@ return array ( ...@@ -104,14 +104,6 @@ return array (
array ( array (
0 => 'app\\plugins\\membershiplevelvip\\Hook', 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' => 'plugins_view_goods_detail_photo_within' =>
array ( array (
0 => 'app\\plugins\\goodsphototag\\Hook', 0 => 'app\\plugins\\goodsphototag\\Hook',
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// | 控制台配置 // | 控制台配置
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
return [ return [
'name' => 'Think Console', 'name' => 'ShopXO Console',
'version' => '0.1', 'version' => '0.1',
'user' => null, 'user' => null,
'auto_path' => env('app_path') . 'command' . DIRECTORY_SEPARATOR, 'auto_path' => env('app_path') . 'command' . DIRECTORY_SEPARATOR,
......
...@@ -9,15 +9,10 @@ ...@@ -9,15 +9,10 @@
// | Author: Devil // | Author: Devil
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
/** // +----------------------------------------------------------------------
* 百度编辑器配置信息 // | 百度编辑器配置信息
* @author Devil // +----------------------------------------------------------------------
* @blog http://gong.gg/ $config_path_type = PathToParams('path_type', 'other');
* @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') : '');
return [ return [
// 上传图片配置项 // 上传图片配置项
// 执行上传图片的action名称 // 执行上传图片的action名称
...@@ -45,7 +40,7 @@ return [ ...@@ -45,7 +40,7 @@ return [
'imageUrlPrefix' => '', '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 [ ...@@ -56,7 +51,7 @@ return [
'scrawlFieldName' => 'upfile', '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 // 上传大小限制,单位B
'scrawlMaxSize' => MyC('home_max_limit_image', 2048000, true), 'scrawlMaxSize' => MyC('home_max_limit_image', 2048000, true),
...@@ -76,7 +71,7 @@ return [ ...@@ -76,7 +71,7 @@ return [
'snapscreenActionName' => 'uploadimage', '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' => '', 'snapscreenUrlPrefix' => '',
...@@ -96,7 +91,7 @@ return [ ...@@ -96,7 +91,7 @@ return [
'catcherFieldName' => 'source', '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' => '', 'catcherUrlPrefix' => '',
...@@ -116,7 +111,7 @@ return [ ...@@ -116,7 +111,7 @@ return [
'videoFieldName' => 'upfile', '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' => '', 'videoUrlPrefix' => '',
...@@ -136,7 +131,7 @@ return [ ...@@ -136,7 +131,7 @@ return [
'fileFieldName' => 'upfile', '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' => '', 'fileUrlPrefix' => '',
...@@ -153,7 +148,7 @@ return [ ...@@ -153,7 +148,7 @@ return [
'imageManagerActionName'=> 'listimage', 'imageManagerActionName'=> 'listimage',
// 指定要列出图片的目录 // 指定要列出图片的目录
'imageManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/images/'.$path_type.'/', 'imageManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/images/'.$config_path_type.'/',
// 每次列出文件数量 // 每次列出文件数量
'imageManagerListSize' => 20, 'imageManagerListSize' => 20,
...@@ -173,7 +168,7 @@ return [ ...@@ -173,7 +168,7 @@ return [
'fileManagerActionName' => 'listfile', 'fileManagerActionName' => 'listfile',
// 指定要列出文件的目录 // 指定要列出文件的目录
'fileManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/file/'.$path_type.'/', 'fileManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/file/'.$config_path_type.'/',
// 文件访问路径前缀 // 文件访问路径前缀
'fileManagerUrlPrefix' => '', 'fileManagerUrlPrefix' => '',
...@@ -188,7 +183,7 @@ return [ ...@@ -188,7 +183,7 @@ return [
'videoManagerActionName' => 'listvideo', 'videoManagerActionName' => 'listvideo',
// 指定要列出文件的目录 // 指定要列出文件的目录
'videoManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/video/'.$path_type.'/', 'videoManagerListPath' => __MY_ROOT_PUBLIC__.'static/upload/video/'.$config_path_type.'/',
// 文件访问路径前缀 // 文件访问路径前缀
'videoManagerUrlPrefix' => '', 'videoManagerUrlPrefix' => '',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册