Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
纵之格
ShopXO
提交
e9ccda84
ShopXO
项目概览
纵之格
/
ShopXO
通知
394
Star
16
Fork
11
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e9ccda84
编写于
10月 08, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
api附件路径优化
上级
d8d2ca57
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
33 addition
and
17 deletion
+33
-17
application/api/controller/Orderaftersale.php
application/api/controller/Orderaftersale.php
+1
-0
application/api/controller/Ueditor.php
application/api/controller/Ueditor.php
+1
-1
application/common.php
application/common.php
+9
-8
application/index/controller/Orderaftersale.php
application/index/controller/Orderaftersale.php
+1
-1
config/ueditor.php
config/ueditor.php
+11
-6
public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
.../user-orderaftersale-detail/user-orderaftersale-detail.js
+3
-0
public/appmini/old/baidu/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
.../user-orderaftersale-detail/user-orderaftersale-detail.js
+4
-1
public/appmini/old/weixin/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
.../user-orderaftersale-detail/user-orderaftersale-detail.js
+3
-0
未找到文件。
application/api/controller/Orderaftersale.php
浏览文件 @
e9ccda84
...
...
@@ -137,6 +137,7 @@ class Orderaftersale extends Common
'return_money_goods_reason'
=>
empty
(
$return_money_goods_reason
)
?
[]
:
explode
(
"
\n
"
,
$return_money_goods_reason
),
'aftersale_type_list'
=>
lang
(
'common_order_aftersale_type_list'
),
'return_goods_address'
=>
MyC
(
'home_order_aftersale_return_goods_address'
,
'管理员未填写'
,
true
),
'editor_path_type'
=>
'orderaftersale-'
.
$this
->
user
[
'id'
]
.
'-'
.
$order_id
.
'-'
.
$order_detail_id
,
];
return
DataReturn
(
'success'
,
0
,
$result
);
}
...
...
application/api/controller/Ueditor.php
浏览文件 @
e9ccda84
...
...
@@ -48,7 +48,7 @@ class Ueditor extends Common
*/
public
function
Index
()
{
$ret
=
UeditorService
::
Run
(
$this
->
data_
po
st
);
$ret
=
UeditorService
::
Run
(
$this
->
data_
reque
st
);
if
(
$ret
[
'code'
]
==
0
&&
!
empty
(
$ret
[
'data'
][
'url'
]))
{
$ret
[
'data'
][
'url'
]
=
ResourcesService
::
AttachmentPathViewHandle
(
$ret
[
'data'
][
'url'
]);
...
...
application/common.php
浏览文件 @
e9ccda84
...
...
@@ -24,11 +24,12 @@
*/
function
PathToParams
(
$key
=
null
,
$default
=
null
,
$path
=
''
)
{
$data
=
$_REQUEST
;
if
(
empty
(
$path
)
&&
isset
(
$_REQUEST
[
's'
]))
{
$path
=
$_REQUEST
[
's'
];
}
if
(
!
empty
(
$path
))
if
(
!
empty
(
$path
)
&&
!
array_key_exists
(
$key
,
$data
)
)
{
if
(
substr
(
$path
,
0
,
1
)
==
'/'
)
{
...
...
@@ -41,7 +42,7 @@ function PathToParams($key = null, $default = null, $path = '')
}
$arr
=
explode
(
'/'
,
$path
);
$data
=
[];
$index
=
0
;
foreach
(
$arr
as
$k
=>
$v
)
{
...
...
@@ -51,13 +52,13 @@ function PathToParams($key = null, $default = null, $path = '')
$index
=
$k
;
}
}
if
(
$key
!==
null
)
{
return
array_key_exists
(
$key
,
$data
)
?
$data
[
$key
]
:
$default
;
}
return
$data
;
}
return
null
;
if
(
$key
!==
null
)
{
return
array_key_exists
(
$key
,
$data
)
?
$data
[
$key
]
:
$default
;
}
return
$data
;
}
/**
...
...
application/index/controller/Orderaftersale.php
浏览文件 @
e9ccda84
...
...
@@ -149,7 +149,7 @@ class Orderaftersale extends Common
$this
->
assign
(
'common_order_aftersale_type_list'
,
lang
(
'common_order_aftersale_type_list'
));
// 编辑器文件存放地址
$this
->
assign
(
'editor_path_type'
,
'
aftersale_'
.
$this
->
user
[
'id'
]
.
'_'
.
$order_id
.
'_
'
.
$order_detail_id
);
$this
->
assign
(
'editor_path_type'
,
'
orderaftersale-'
.
$this
->
user
[
'id'
]
.
'-'
.
$order_id
.
'-
'
.
$order_detail_id
);
$this
->
assign
(
'params'
,
$params
);
return
$this
->
fetch
();
...
...
config/ueditor.php
浏览文件 @
e9ccda84
...
...
@@ -12,7 +12,12 @@
// +----------------------------------------------------------------------
// | 百度编辑器配置信息
// +----------------------------------------------------------------------
// path_type指定的路径值
$config_path_type
=
PathToParams
(
'path_type'
,
'other'
);
// 上传指定路径值 - 符号换成目录分隔符
$upload_path
=
str_replace
(
'-'
,
'/'
,
$config_path_type
);
return
[
// 上传图片配置项
// 执行上传图片的action名称
...
...
@@ -40,7 +45,7 @@ return [
'imageUrlPrefix'
=>
''
,
// 上传保存路径,可以自定义保存路径和文件名格式
'imagePathFormat'
=>
__MY_ROOT_PUBLIC__
.
'static/upload/images/'
.
$
config_path_type
.
'/{yyyy}/{mm}/{dd}/{time}{rand:6}'
,
'imagePathFormat'
=>
__MY_ROOT_PUBLIC__
.
'static/upload/images/'
.
$
upload_path
.
'/{yyyy}/{mm}/{dd}/{time}{rand:6}'
,
// 涂鸦图片上传配置项
...
...
@@ -51,7 +56,7 @@ return [
'scrawlFieldName'
=>
'upfile'
,
// 上传保存路径,可以自定义保存路径和文件名格式
'scrawlPathFormat'
=>
__MY_ROOT_PUBLIC__
.
'static/upload/images/'
.
$
config_path_type
.
'/{yyyy}/{mm}/{dd}/{time}{rand:6}'
,
'scrawlPathFormat'
=>
__MY_ROOT_PUBLIC__
.
'static/upload/images/'
.
$
upload_path
.
'/{yyyy}/{mm}/{dd}/{time}{rand:6}'
,
// 上传大小限制,单位B
'scrawlMaxSize'
=>
MyC
(
'home_max_limit_image'
,
2048000
,
true
),
...
...
@@ -71,7 +76,7 @@ return [
'snapscreenActionName'
=>
'uploadimage'
,
// 上传保存路径,可以自定义保存路径和文件名格式
'snapscreenPathFormat'
=>
__MY_ROOT_PUBLIC__
.
'static/upload/images/'
.
$
config_path_type
.
'/{yyyy}/{mm}/{dd}/{time}{rand:6}'
,
'snapscreenPathFormat'
=>
__MY_ROOT_PUBLIC__
.
'static/upload/images/'
.
$
upload_path
.
'/{yyyy}/{mm}/{dd}/{time}{rand:6}'
,
// 图片访问路径前缀
'snapscreenUrlPrefix'
=>
''
,
...
...
@@ -91,7 +96,7 @@ return [
'catcherFieldName'
=>
'source'
,
// 上传保存路径,可以自定义保存路径和文件名格式
'catcherPathFormat'
=>
__MY_ROOT_PUBLIC__
.
'static/upload/images/'
.
$
config_path_type
.
'/{yyyy}/{mm}/{dd}/{time}{rand:6}'
,
'catcherPathFormat'
=>
__MY_ROOT_PUBLIC__
.
'static/upload/images/'
.
$
upload_path
.
'/{yyyy}/{mm}/{dd}/{time}{rand:6}'
,
// 图片访问路径前缀
'catcherUrlPrefix'
=>
''
,
...
...
@@ -111,7 +116,7 @@ return [
'videoFieldName'
=>
'upfile'
,
// 上传保存路径,可以自定义保存路径和文件名格式
'videoPathFormat'
=>
__MY_ROOT_PUBLIC__
.
'static/upload/video/'
.
$
config_path_type
.
'/{yyyy}/{mm}/{dd}/{time}{rand:6}'
,
'videoPathFormat'
=>
__MY_ROOT_PUBLIC__
.
'static/upload/video/'
.
$
upload_path
.
'/{yyyy}/{mm}/{dd}/{time}{rand:6}'
,
// 视频访问路径前缀
'videoUrlPrefix'
=>
''
,
...
...
@@ -131,7 +136,7 @@ return [
'fileFieldName'
=>
'upfile'
,
// 上传保存路径,可以自定义保存路径和文件名格式
'filePathFormat'
=>
__MY_ROOT_PUBLIC__
.
'static/upload/file/'
.
$
config_path_type
.
'/{yyyy}/{mm}/{dd}/{time}{rand:6}'
,
'filePathFormat'
=>
__MY_ROOT_PUBLIC__
.
'static/upload/file/'
.
$
upload_path
.
'/{yyyy}/{mm}/{dd}/{time}{rand:6}'
,
// 文件访问路径前缀
'fileUrlPrefix'
=>
''
,
...
...
public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
浏览文件 @
e9ccda84
...
...
@@ -8,6 +8,7 @@ Page({
popup_delivery_status
:
false
,
// 接口数据
editor_path_type
:
''
,
order_data
:
null
,
new_aftersale_data
:
null
,
step_data
:
null
,
...
...
@@ -147,6 +148,7 @@ Page({
data_bottom_line_status
:
true
,
data_list_loding_msg
:
''
,
editor_path_type
:
data
.
editor_path_type
||
''
,
order_data
:
data
.
order_data
||
null
,
new_aftersale_data
:
((
data
.
new_aftersale_data
||
null
)
==
null
||
data
.
new_aftersale_data
.
length
<=
0
)
?
null
:
data
.
new_aftersale_data
,
step_data
:
data
.
step_data
||
null
,
...
...
@@ -286,6 +288,7 @@ Page({
fileType
:
'
image
'
,
formData
:
{
action
:
'
uploadimage
'
,
path_type
:
self
.
data
.
editor_path_type
},
success
:
function
(
res
)
{
success
++
;
...
...
public/appmini/old/baidu/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
浏览文件 @
e9ccda84
...
...
@@ -8,6 +8,7 @@ Page({
popup_delivery_status
:
false
,
// 接口数据
editor_path_type
:
''
,
order_data
:
null
,
new_aftersale_data
:
null
,
step_data
:
null
,
...
...
@@ -127,6 +128,7 @@ Page({
data_bottom_line_status
:
true
,
data_list_loding_msg
:
''
,
editor_path_type
:
data
.
editor_path_type
||
''
,
order_data
:
data
.
order_data
||
null
,
new_aftersale_data
:
(
data
.
new_aftersale_data
||
null
)
==
null
||
data
.
new_aftersale_data
.
length
<=
0
?
null
:
data
.
new_aftersale_data
,
step_data
:
data
.
step_data
||
null
,
...
...
@@ -264,7 +266,8 @@ Page({
filePath
:
img_paths
[
count
],
name
:
'
upfile
'
,
formData
:
{
action
:
'
uploadimage
'
action
:
'
uploadimage
'
,
path_type
:
self
.
data
.
editor_path_type
},
success
:
function
(
res
)
{
success
++
;
...
...
public/appmini/old/weixin/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
浏览文件 @
e9ccda84
...
...
@@ -8,6 +8,7 @@ Page({
popup_delivery_status
:
false
,
// 接口数据
editor_path_type
:
''
,
order_data
:
null
,
new_aftersale_data
:
null
,
step_data
:
null
,
...
...
@@ -147,6 +148,7 @@ Page({
data_bottom_line_status
:
true
,
data_list_loding_msg
:
''
,
editor_path_type
:
data
.
editor_path_type
||
''
,
order_data
:
data
.
order_data
||
null
,
new_aftersale_data
:
((
data
.
new_aftersale_data
||
null
)
==
null
||
data
.
new_aftersale_data
.
length
<=
0
)
?
null
:
data
.
new_aftersale_data
,
step_data
:
data
.
step_data
||
null
,
...
...
@@ -285,6 +287,7 @@ Page({
name
:
'
upfile
'
,
formData
:
{
action
:
'
uploadimage
'
,
path_type
:
self
.
data
.
editor_path_type
},
success
:
function
(
res
)
{
success
++
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录