附件配置细节优化

This commit is contained in:
gongfuxiang 2019-08-07 00:14:13 +08:00
parent b607ca2ccd
commit af0c84c51a
5 changed files with 21 additions and 30 deletions

View File

@ -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) == '/')

View File

@ -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)

View File

@ -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',

View File

@ -13,7 +13,7 @@
// | 控制台配置
// +----------------------------------------------------------------------
return [
'name' => 'Think Console',
'name' => 'ShopXO Console',
'version' => '0.1',
'user' => null,
'auto_path' => env('app_path') . 'command' . DIRECTORY_SEPARATOR,

View File

@ -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' => '',