Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
6c25c1a5
ShopXO
项目概览
starsw001
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6c25c1a5
编写于
3月 04, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
编辑器文件上传接口统一
上级
6d0d6efb
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
112 addition
and
156 deletion
+112
-156
application/admin/controller/Ueditor.php
application/admin/controller/Ueditor.php
+2
-6
application/admin/view/default/payment/index.html
application/admin/view/default/payment/index.html
+1
-1
application/index/controller/Ueditor.php
application/index/controller/Ueditor.php
+1
-6
application/service/ResourcesService.php
application/service/ResourcesService.php
+3
-1
application/service/UeditorService.php
application/service/UeditorService.php
+32
-68
application/tags.php
application/tags.php
+11
-0
public/static/common/lib/ueditor/dialogs/attachment/attachment.js
...tatic/common/lib/ueditor/dialogs/attachment/attachment.js
+10
-10
public/static/common/lib/ueditor/dialogs/background/background.js
...tatic/common/lib/ueditor/dialogs/background/background.js
+4
-4
public/static/common/lib/ueditor/dialogs/image/image.js
public/static/common/lib/ueditor/dialogs/image/image.js
+9
-9
public/static/common/lib/ueditor/dialogs/scrawl/scrawl.js
public/static/common/lib/ueditor/dialogs/scrawl/scrawl.js
+5
-5
public/static/common/lib/ueditor/dialogs/video/video.js
public/static/common/lib/ueditor/dialogs/video/video.js
+11
-11
public/static/common/lib/ueditor/ueditor.all.js
public/static/common/lib/ueditor/ueditor.all.js
+23
-17
public/static/common/lib/ueditor/ueditor.all.min.js
public/static/common/lib/ueditor/ueditor.all.min.js
+0
-18
未找到文件。
application/admin/controller/Ueditor.php
浏览文件 @
6c25c1a5
...
...
@@ -11,6 +11,7 @@
namespace
app\admin\controller
;
use
app\service\UeditorService
;
use
app\service\ResourcesService
;
/**
* 百度编辑器控制器入口
...
...
@@ -47,12 +48,7 @@ class Ueditor extends Common
*/
public
function
Index
()
{
$ret
=
UeditorService
::
Run
(
input
());
if
(
$ret
[
'code'
]
==
0
)
{
return
json
(
$ret
[
'data'
]);
}
return
$ret
[
'msg'
];
return
json
(
UeditorService
::
Run
(
input
()));
}
}
?>
\ No newline at end of file
application/admin/view/default/payment/index.html
浏览文件 @
6c25c1a5
...
...
@@ -29,7 +29,7 @@
<tbody>
{{if !empty($data_list)}}
{{foreach $data_list as $v}}
<tr
id=
"data-list-{{$v.payment}}"
{{
if
$
v
['
is_install
']
eq
0}}
class=
"am-
warning
"
{{
elseif
$
v
['
is_enable
']
eq
0
/}}
class=
"am-active"
{{/
if
}}
>
<tr
id=
"data-list-{{$v.payment}}"
{{
if
$
v
['
is_install
']
eq
0}}
class=
"am-
disabled
"
{{
elseif
$
v
['
is_enable
']
eq
0
/}}
class=
"am-active"
{{/
if
}}
>
<td
class=
"am-text-middle"
>
{{$v.name}}
{{if !empty($v['version'])}}
...
...
application/index/controller/Ueditor.php
浏览文件 @
6c25c1a5
...
...
@@ -44,12 +44,7 @@ class Ueditor extends Common
*/
public
function
Index
()
{
$ret
=
UeditorService
::
Run
(
input
());
if
(
$ret
[
'code'
]
==
0
)
{
return
json
(
$ret
[
'data'
]);
}
return
$ret
[
'msg'
];
return
json
(
UeditorService
::
Run
(
input
()));
}
}
?>
\ No newline at end of file
application/service/ResourcesService.php
浏览文件 @
6c25c1a5
...
...
@@ -197,6 +197,8 @@ class ResourcesService
'attachment_id'
=>
$attachment_id
,
]);
$params
[
'id'
]
=
$attachment_id
;
$params
[
'add_time'
]
=
date
(
'Y-m-d H:i:s'
,
$data
[
'add_time'
]);
return
DataReturn
(
'添加成功'
,
0
,
$params
);
}
...
...
@@ -267,7 +269,7 @@ class ResourcesService
}
}
}
return
DataReturn
(
'
操作成功
'
,
0
,
$data
);
return
DataReturn
(
'
success
'
,
0
,
$data
);
}
/**
...
...
application/service/UeditorService.php
浏览文件 @
6c25c1a5
...
...
@@ -23,7 +23,6 @@ class UeditorService
{
private
static
$current_action
;
private
static
$current_config
;
private
static
$current_result
;
private
static
$params
;
private
static
$path_type
;
...
...
@@ -45,11 +44,12 @@ class UeditorService
self
::
$path_type
=
isset
(
$params
[
'path_type'
])
?
$params
[
'path_type'
]
:
PathToParams
(
'path_type'
,
'other'
);
// action
$ret
=
DataReturn
(
'请求action有误'
,
-
1
);
switch
(
self
::
$current_action
)
{
// 配置信息
case
'config'
:
self
::
$current_resul
t
=
self
::
$current_config
;
$re
t
=
self
::
$current_config
;
break
;
/* 上传图片 */
...
...
@@ -60,7 +60,7 @@ class UeditorService
case
'uploadvideo'
:
/* 上传文件 */
case
'uploadfile'
:
self
::
ActionUpload
();
$ret
=
self
::
ActionUpload
();
break
;
/* 列出图片 */
...
...
@@ -69,23 +69,18 @@ class UeditorService
case
'listfile'
:
/* 列出视频 */
case
'listvideo'
:
self
::
ActionList
();
$ret
=
self
::
ActionList
();
break
;
/* 抓取远程文件 */
case
'catchimage'
:
self
::
ActionCrawler
();
$ret
=
self
::
ActionCrawler
();
break
;
/* 删除文件 */
case
'deletefile'
:
self
::
DeleteFile
();
break
;
default
:
self
::
$current_result
=
[
'state'
=>
'请求地址出错'
];
$ret
=
self
::
DeleteFile
();
break
;
}
// 输出结果
...
...
@@ -98,13 +93,7 @@ class UeditorService
return
DataReturn
(
'callback参数不合法'
,
-
1
);
}
}
// 未成功,非web环境下直接返回错误信息
if
(
!
in_array
(
APPLICATION_CLIENT_TYPE
,
[
'pc'
,
'h5'
])
&&
isset
(
self
::
$current_result
[
'state'
])
&&
self
::
$current_result
[
'state'
]
!=
'SUCCESS'
)
{
return
DataReturn
(
self
::
$current_result
[
'state'
],
-
1
);
}
return
DataReturn
(
'操作成功'
,
0
,
self
::
$current_result
);
return
$ret
;
}
/**
...
...
@@ -117,17 +106,7 @@ class UeditorService
*/
private
static
function
DeleteFile
()
{
$ret
=
ResourcesService
::
AttachmentDelete
(
input
());
if
(
$ret
[
'code'
]
==
0
)
{
self
::
$current_result
=
[
'state'
=>
'SUCCESS'
];
}
else
{
self
::
$current_result
=
[
'state'
=>
$ret
[
'msg'
]
];
}
return
ResourcesService
::
AttachmentDelete
(
input
());
}
/**
...
...
@@ -205,16 +184,9 @@ class UeditorService
{
$data
[
'type'
]
=
$attachment_type
;
$data
[
'path_type'
]
=
self
::
$path_type
;
$ret
=
ResourcesService
::
AttachmentAdd
(
$data
);
if
(
$ret
[
'code'
]
==
0
)
{
self
::
$current_result
=
$ret
[
'data'
];
}
else
{
self
::
$current_result
=
[
'state'
=>
$ret
[
'msg'
]];
}
}
else
{
self
::
$current_result
=
$data
;
return
ResourcesService
::
AttachmentAdd
(
$data
);
}
return
DataReturn
(
isset
(
$data
[
'state'
])
?
$data
[
'state'
]
:
'上传失败'
,
-
1
);
}
/**
...
...
@@ -272,23 +244,24 @@ class UeditorService
$params
[
'where'
][]
=
[
'original'
,
'like'
,
'%'
.
self
::
$params
[
'keywords'
]
.
'%'
];
}
// 数据初始化
$data
=
array
(
'state'
=>
"没有相关数据"
,
'list'
=>
[],
'start'
=>
$start
,
'total'
=>
ResourcesService
::
AttachmentTotal
(
$params
[
'where'
]),
);
// 总数
$total
=
ResourcesService
::
AttachmentTotal
(
$params
[
'where'
]);
// 获取数据
$ret
=
ResourcesService
::
AttachmentList
(
$params
);
if
(
!
empty
(
$ret
[
'data'
]))
if
(
$total
>
0
)
{
$data
[
'state'
]
=
'SUCCESS'
;
$data
[
'list'
]
=
$ret
[
'data'
];
$ret
=
ResourcesService
::
AttachmentList
(
$params
);
if
(
!
empty
(
$ret
[
'data'
]))
{
return
DataReturn
(
'success'
,
0
,
[
'start'
=>
$start
,
'total'
=>
$total
,
'list'
=>
$ret
[
'data'
],
]);
}
}
self
::
$current_result
=
$data
;
return
DataReturn
(
'没有相关数据'
,
-
1
)
;
}
/**
...
...
@@ -333,26 +306,17 @@ class UeditorService
$data
[
'type'
]
=
'remote'
;
$data
[
'path_type'
]
=
self
::
$path_type
;
$ret
=
ResourcesService
::
AttachmentAdd
(
$data
);
if
(
$ret
[
'code'
]
!
=
0
)
if
(
$ret
[
'code'
]
=
=
0
)
{
$data
[
'state'
]
=
$ret
[
'msg'
]
;
array_push
(
$list
,
$ret
[
'data'
])
;
}
}
array_push
(
$list
,
array
(
"state"
=>
$data
[
"state"
],
"url"
=>
$data
[
"url"
],
"size"
=>
$data
[
"size"
],
"title"
=>
htmlspecialchars
(
$data
[
"title"
]),
"original"
=>
htmlspecialchars
(
$data
[
"original"
]),
"source"
=>
htmlspecialchars
(
$imgUrl
)
));
}
/* 返回抓取数据 */
self
::
$current_result
=
[
'state'
=>
count
(
$list
)
?
'SUCCESS'
:
'ERROR'
,
'list'
=>
$list
,
];
if
(
!
empty
(
$list
))
{
return
DataReturn
(
'success'
,
0
,
$list
);
}
return
DataReturn
(
'没有相关数据'
,
-
1
);
}
}
?>
\ No newline at end of file
application/tags.php
浏览文件 @
6c25c1a5
...
...
@@ -32,12 +32,21 @@ return array (
'log_write'
=>
array
(
),
'plugins_view_admin_order_top_operate'
=>
array
(
0
=>
'app\\plugins\\orderexportprint\\Hook'
,
),
'plugins_view_admin_order_list_operate'
=>
array
(
0
=>
'app\\plugins\\orderexportprint\\Hook'
,
),
'plugins_service_users_center_left_menu_handle'
=>
array
(
0
=>
'app\\plugins\\excellentbuyreturntocash\\Hook'
,
1
=>
'app\\plugins\\coupon\\Hook'
,
2
=>
'app\\plugins\\distribution\\Hook'
,
3
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
4
=>
'app\\plugins\\wallet\\Hook'
,
),
'plugins_service_header_navigation_top_right_handle'
=>
array
(
...
...
@@ -45,6 +54,7 @@ return array (
1
=>
'app\\plugins\\coupon\\Hook'
,
2
=>
'app\\plugins\\distribution\\Hook'
,
3
=>
'app\\plugins\\membershiplevelvip\\Hook'
,
4
=>
'app\\plugins\\wallet\\Hook'
,
),
'plugins_service_buy_order_insert_begin'
=>
array
(
...
...
@@ -107,6 +117,7 @@ return array (
'plugins_service_user_register_end'
=>
array
(
0
=>
'app\\plugins\\coupon\\Hook'
,
1
=>
'app\\plugins\\wallet\\Hook'
,
),
'plugins_service_site_extraction_address_list'
=>
array
(
...
...
public/static/common/lib/ueditor/dialogs/attachment/attachment.js
浏览文件 @
6c25c1a5
...
...
@@ -51,7 +51,7 @@
break
;
case
'
online
'
:
document
.
getElementById
(
'
search-container
'
).
setAttribute
(
'
class
'
,
''
);
onlineFile
=
onlineFile
||
new
OnlineFile
(
'
fileList
'
);
onlineFile
=
new
OnlineFile
(
'
fileList
'
);
break
;
}
}
...
...
@@ -514,11 +514,11 @@
try
{
var
responseText
=
(
ret
.
_raw
||
ret
),
json
=
utils
.
str2json
(
responseText
);
if
(
json
.
state
==
'
SUCCESS
'
)
{
_this
.
fileList
.
push
(
json
);
if
(
json
.
code
==
0
)
{
_this
.
fileList
.
push
(
json
.
data
);
$file
.
append
(
'
<span class="success"></span>
'
);
}
else
{
$file
.
find
(
'
.error
'
).
text
(
json
.
state
).
show
();
$file
.
find
(
'
.error
'
).
text
(
json
.
msg
).
show
();
}
}
catch
(
e
)
{
$file
.
find
(
'
.error
'
).
text
(
lang
.
errorServerUpload
).
show
();
...
...
@@ -653,10 +653,10 @@
onsuccess
:
function
(
r
)
{
try
{
var
json
=
eval
(
'
(
'
+
r
.
responseText
+
'
)
'
);
if
(
json
.
state
==
'
SUCCESS
'
)
{
_this
.
pushData
(
json
.
list
);
_this
.
listIndex
=
parseInt
(
json
.
start
)
+
parseInt
(
json
.
list
.
length
);
if
(
_this
.
listIndex
>=
json
.
total
)
{
if
(
json
.
code
==
0
)
{
_this
.
pushData
(
json
.
data
.
list
);
_this
.
listIndex
=
parseInt
(
json
.
data
.
start
)
+
parseInt
(
json
.
data
.
list
.
length
);
if
(
_this
.
listIndex
>=
json
.
data
.
total
)
{
_this
.
listEnd
=
true
;
}
_this
.
isLoadingData
=
false
;
...
...
@@ -735,8 +735,8 @@
}
finally
{
if
(
!
confirm
(
"
确定要删除吗?
"
))
return
;
$
.
post
(
editor
.
getOpt
(
"
serverUrl
"
)
+
"
?action=deletefile
"
,
{
"
id
"
:
del
.
attr
(
"
data-id
"
)
},
function
(
response
)
{
if
(
response
.
state
==
'
SUCCESS
'
)
del
.
parent
().
remove
();
else
alert
(
response
.
state
);
if
(
response
.
code
==
0
)
del
.
parent
().
remove
();
else
alert
(
response
.
msg
);
});
}
})[
0
]);
...
...
public/static/common/lib/ueditor/dialogs/background/background.js
浏览文件 @
6c25c1a5
...
...
@@ -270,10 +270,10 @@
'
onsuccess
'
:
function
(
r
)
{
try
{
var
json
=
isJsonp
?
r
:
eval
(
'
(
'
+
r
.
responseText
+
'
)
'
);
if
(
json
.
state
==
'
SUCCESS
'
)
{
_this
.
pushData
(
json
.
list
);
_this
.
listIndex
=
parseInt
(
json
.
start
)
+
parseInt
(
json
.
list
.
length
);
if
(
_this
.
listIndex
>=
json
.
total
)
{
if
(
json
.
code
==
0
)
{
_this
.
pushData
(
json
.
data
.
list
);
_this
.
listIndex
=
parseInt
(
json
.
data
.
start
)
+
parseInt
(
json
.
data
.
list
.
length
);
if
(
_this
.
listIndex
>=
json
.
data
.
total
)
{
_this
.
listEnd
=
true
;
}
_this
.
isLoadingData
=
false
;
...
...
public/static/common/lib/ueditor/dialogs/image/image.js
浏览文件 @
6c25c1a5
...
...
@@ -693,11 +693,11 @@
try
{
var
responseText
=
(
ret
.
_raw
||
ret
),
json
=
utils
.
str2json
(
responseText
);
if
(
json
.
state
==
'
SUCCESS
'
)
{
_this
.
imageList
.
push
(
json
);
if
(
json
.
code
==
0
)
{
_this
.
imageList
.
push
(
json
.
data
);
$file
.
append
(
'
<span class="success"></span>
'
);
}
else
{
$file
.
find
(
'
.error
'
).
text
(
json
.
state
).
show
();
$file
.
find
(
'
.error
'
).
text
(
json
.
msg
).
show
();
}
}
catch
(
e
)
{
$file
.
find
(
'
.error
'
).
text
(
lang
.
errorServerUpload
).
show
();
...
...
@@ -845,10 +845,10 @@
'
onsuccess
'
:
function
(
r
)
{
try
{
var
json
=
isJsonp
?
r
:
eval
(
'
(
'
+
r
.
responseText
+
'
)
'
);
if
(
json
.
state
==
'
SUCCESS
'
)
{
_this
.
pushData
(
json
.
list
);
_this
.
listIndex
=
parseInt
(
json
.
start
)
+
parseInt
(
json
.
list
.
length
);
if
(
_this
.
listIndex
>=
json
.
total
)
{
if
(
json
.
code
==
0
)
{
_this
.
pushData
(
json
.
data
.
list
);
_this
.
listIndex
=
parseInt
(
json
.
data
.
start
)
+
parseInt
(
json
.
data
.
list
.
length
);
if
(
_this
.
listIndex
>=
json
.
data
.
total
)
{
_this
.
listEnd
=
true
;
}
_this
.
isLoadingData
=
false
;
...
...
@@ -910,8 +910,8 @@
}
finally
{
if
(
!
confirm
(
"
确定要删除吗?
"
))
return
;
$
.
post
(
editor
.
getOpt
(
"
serverUrl
"
)
+
"
?action=deletefile
"
,
{
"
id
"
:
del
.
attr
(
"
data-id
"
)
},
function
(
response
)
{
if
(
response
.
state
==
'
SUCCESS
'
)
del
.
parent
().
remove
();
else
alert
(
response
.
state
);
if
(
response
.
code
==
0
)
del
.
parent
().
remove
();
else
alert
(
response
.
msg
);
});
}
})[
0
]);
...
...
public/static/common/lib/ueditor/dialogs/scrawl/scrawl.js
浏览文件 @
6c25c1a5
...
...
@@ -637,17 +637,17 @@ function exec(scrawlObj) {
if
(
!
scrawlObj
.
isCancelScrawl
)
{
var
responseObj
;
responseObj
=
eval
(
"
(
"
+
xhr
.
responseText
+
"
)
"
);
if
(
responseObj
.
state
==
"
SUCCESS
"
)
{
if
(
responseObj
.
code
==
0
)
{
var
imgObj
=
{},
url
=
editor
.
options
.
scrawlUrlPrefix
+
responseObj
.
url
;
url
=
editor
.
options
.
scrawlUrlPrefix
+
responseObj
.
data
.
url
;
imgObj
.
src
=
url
;
imgObj
.
_src
=
url
;
imgObj
.
alt
=
responseObj
.
original
||
''
;
imgObj
.
title
=
responseObj
.
title
||
''
;
imgObj
.
alt
=
responseObj
.
data
.
original
||
''
;
imgObj
.
title
=
responseObj
.
data
.
title
||
''
;
editor
.
execCommand
(
"
insertImage
"
,
imgObj
);
dialog
.
close
();
}
else
{
alert
(
responseObj
.
state
);
alert
(
responseObj
.
msg
);
}
}
...
...
public/static/common/lib/ueditor/dialogs/video/video.js
浏览文件 @
6c25c1a5
...
...
@@ -225,10 +225,10 @@
'
onsuccess
'
:
function
(
r
)
{
try
{
var
json
=
isJsonp
?
r
:
eval
(
'
(
'
+
r
.
responseText
+
'
)
'
);
if
(
json
.
state
==
'
SUCCESS
'
)
{
_this
.
pushData
(
json
.
list
);
_this
.
listIndex
=
parseInt
(
json
.
start
)
+
parseInt
(
json
.
list
.
length
);
if
(
_this
.
listIndex
>=
json
.
total
)
{
if
(
json
.
code
==
0
)
{
_this
.
pushData
(
json
.
data
.
list
);
_this
.
listIndex
=
parseInt
(
json
.
data
.
start
)
+
parseInt
(
json
.
data
.
list
.
length
);
if
(
_this
.
listIndex
>=
json
.
data
.
total
)
{
_this
.
listEnd
=
true
;
}
_this
.
isLoadingData
=
false
;
...
...
@@ -287,8 +287,8 @@
}
finally
{
if
(
!
confirm
(
"
确定要删除吗?
"
))
return
;
$
.
post
(
editor
.
getOpt
(
"
serverUrl
"
)
+
"
?action=deletefile
"
,
{
"
id
"
:
del
.
attr
(
"
data-id
"
)
},
function
(
response
)
{
if
(
response
.
state
==
'
SUCCESS
'
)
del
.
parent
().
remove
();
else
alert
(
response
.
state
);
if
(
response
.
code
==
0
)
del
.
parent
().
remove
();
else
alert
(
response
.
msg
);
});
}
})[
0
]);
...
...
@@ -963,15 +963,15 @@
try
{
var
responseText
=
(
ret
.
_raw
||
ret
),
json
=
utils
.
str2json
(
responseText
);
if
(
json
.
state
==
'
SUCCESS
'
)
{
if
(
json
.
code
==
0
)
{
uploadVideoList
.
push
({
'
url
'
:
json
.
url
,
'
type
'
:
json
.
type
,
'
original
'
:
json
.
original
'
url
'
:
json
.
data
.
url
,
'
type
'
:
json
.
data
.
type
,
'
original
'
:
json
.
data
.
original
});
$file
.
append
(
'
<span class="success"></span>
'
);
}
else
{
$file
.
find
(
'
.error
'
).
text
(
json
.
state
).
show
();
$file
.
find
(
'
.error
'
).
text
(
json
.
msg
).
show
();
}
}
catch
(
e
)
{
$file
.
find
(
'
.error
'
).
text
(
lang
.
errorServerUpload
).
show
();
...
...
public/static/common/lib/ueditor/ueditor.all.js
浏览文件 @
6c25c1a5
...
...
@@ -23241,25 +23241,31 @@ UE.plugins['catchremoteimage'] = function () {
//成功抓取
success: function (r) {
try {
var info = r.
state !== undefined
? r:eval("(" + r.responseText + ")");
var info = r.
code == 0
? r:eval("(" + r.responseText + ")");
} catch (e) {
return;
}
/* 获取源路径和新路径 */
var i, j, ci, cj, oldSrc, newSrc, list = info.list;
var i, j, ci, cj, oldSrc, newSrc, list = info.data || null;
if(list == null || list.length <= 0)
{
return;
}
// 循环处理图片替换
for (i = 0; ci = imgs[i++];) {
oldSrc = ci.getAttribute("_src") || ci.src || "";
for (j = 0; cj = list[j++];) {
if (oldSrc == cj.source && cj.state == "SUCCESS") { //抓取失败时不做替换处理
if((cj.url || null) != null)
{
newSrc = catcherUrlPrefix + cj.url;
domUtils.setAttributes(ci, {
"src": newSrc,
"_src": newSrc
});
break;
}
break;
}
}
me.fireEvent('catchremotesuccess')
...
...
@@ -23356,16 +23362,16 @@ UE.plugin.register('snapscreen', function (){
function onSuccess(rs){
try{
rs = eval("("+ rs +")");
if(rs.
state == 'SUCCESS'
){
if(rs.
code == 0
){
var opt = me.options;
me.execCommand('insertimage', {
src: opt.snapscreenUrlPrefix + rs.url,
_src: opt.snapscreenUrlPrefix + rs.url,
alt: rs.title || '',
src: opt.snapscreenUrlPrefix + rs.
data.
url,
_src: opt.snapscreenUrlPrefix + rs.
data.
url,
alt: rs.
data.
title || '',
floatStyle: opt.snapscreenImgAlign
});
} else {
alert(rs.
state
);
alert(rs.
msg
);
}
}catch(e){
alert(lang.callBackErrorMsg);
...
...
@@ -23833,10 +23839,10 @@ UE.plugin.register('autoupload', function (){
xhr.addEventListener('load', function (e) {
try{
var json = (new Function("return " + utils.trim(e.target.response)))();
if (json.
state == 'SUCCESS' && json
.url) {
successHandler(json);
if (json.
code == 0 && json.data
.url) {
successHandler(json
.data
);
} else {
errorHandler(json.
state
);
errorHandler(json.
msg
);
}
}catch(er){
errorHandler(me.getLang('autoupload.loadError'));
...
...
@@ -24528,17 +24534,17 @@ UE.plugin.register('simpleupload', function (){
body = (iframe.contentDocument || iframe.contentWindow.document).body,
result = body.innerText || body.textContent || '';
json = (new Function("return " + result))();
link = me.options.imageUrlPrefix + json.url;
if(json.
state == 'SUCCESS' && json
.url) {
link = me.options.imageUrlPrefix + json.
data.
url;
if(json.
code == 0 && json.data
.url) {
loader = me.document.getElementById(loadingId);
loader.setAttribute('src', link);
loader.setAttribute('_src', link);
loader.setAttribute('title', json.title || '');
loader.setAttribute('alt', json.original || '');
loader.setAttribute('title', json.
data.
title || '');
loader.setAttribute('alt', json.
data.
original || '');
loader.removeAttribute('id');
domUtils.removeClasses(loader, 'loadingclass');
} else {
showErrorLoader && showErrorLoader(json.
state
);
showErrorLoader && showErrorLoader(json.
msg
);
}
}catch(er){
showErrorLoader && showErrorLoader(me.getLang('simpleupload.loadError'));
public/static/common/lib/ueditor/ueditor.all.min.js
已删除
100755 → 0
浏览文件 @
6d0d6efb
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录