Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
70dd60e0
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,发现更多精彩内容 >>
提交
70dd60e0
编写于
3月 05, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
编辑器接口优化+涂鸦
上级
6c25c1a5
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
45 addition
and
37 deletion
+45
-37
application/api/controller/Ueditor.php
application/api/controller/Ueditor.php
+1
-7
application/service/ResourcesService.php
application/service/ResourcesService.php
+1
-0
application/service/UeditorService.php
application/service/UeditorService.php
+4
-15
public/static/common/js/common.js
public/static/common/js/common.js
+8
-1
public/static/common/lib/ueditor/dialogs/scrawl/scrawl.css
public/static/common/lib/ueditor/dialogs/scrawl/scrawl.css
+16
-6
public/static/common/lib/ueditor/dialogs/scrawl/scrawl.html
public/static/common/lib/ueditor/dialogs/scrawl/scrawl.html
+1
-1
public/static/common/lib/ueditor/dialogs/scrawl/scrawl.js
public/static/common/lib/ueditor/dialogs/scrawl/scrawl.js
+2
-0
public/static/common/lib/ueditor/themes/default/css/ueditor.css
.../static/common/lib/ueditor/themes/default/css/ueditor.css
+3
-3
public/static/common/lib/ueditor/ueditor.all.js
public/static/common/lib/ueditor/ueditor.all.js
+9
-4
未找到文件。
application/api/controller/Ueditor.php
浏览文件 @
70dd60e0
...
...
@@ -11,7 +11,6 @@
namespace
app\api\controller
;
use
app\service\UeditorService
;
use
app\service\ResourcesService
;
/**
* 附件上传
...
...
@@ -48,12 +47,7 @@ class Ueditor extends Common
*/
public
function
Index
()
{
$ret
=
UeditorService
::
Run
(
$this
->
data_request
);
if
(
$ret
[
'code'
]
==
0
&&
!
empty
(
$ret
[
'data'
][
'url'
]))
{
$ret
[
'data'
][
'url'
]
=
ResourcesService
::
AttachmentPathViewHandle
(
ResourcesService
::
AttachmentPathHandle
(
$ret
[
'data'
][
'url'
]));
}
return
$ret
;
return
UeditorService
::
Run
(
$this
->
data_request
);
}
}
?>
\ No newline at end of file
application/service/ResourcesService.php
浏览文件 @
70dd60e0
...
...
@@ -198,6 +198,7 @@ class ResourcesService
]);
$params
[
'id'
]
=
$attachment_id
;
$params
[
'url'
]
=
self
::
AttachmentPathViewHandle
(
$data
[
'url'
]);
$params
[
'add_time'
]
=
date
(
'Y-m-d H:i:s'
,
$data
[
'add_time'
]);
return
DataReturn
(
'添加成功'
,
0
,
$params
);
}
...
...
application/service/UeditorService.php
浏览文件 @
70dd60e0
...
...
@@ -49,7 +49,7 @@ class UeditorService
{
// 配置信息
case
'config'
:
$ret
=
self
::
$current_config
;
$ret
=
DataReturn
(
'success'
,
0
,
self
::
$current_config
)
;
break
;
/* 上传图片 */
...
...
@@ -80,18 +80,7 @@ class UeditorService
/* 删除文件 */
case
'deletefile'
:
$ret
=
self
::
DeleteFile
();
break
;
}
// 输出结果
if
(
!
empty
(
$params
[
'callback'
]))
{
if
(
preg_match
(
"/^[\w_]+$/"
,
$params
[
'callback'
]))
{
return
DataReturn
(
htmlspecialchars
(
$params
[
'callback'
]),
-
1
);
}
else
{
return
DataReturn
(
'callback参数不合法'
,
-
1
);
}
break
;
}
return
$ret
;
}
...
...
@@ -224,8 +213,8 @@ class UeditorService
$allow_files
=
substr
(
str_replace
(
"."
,
"|"
,
join
(
""
,
$allow_files
)),
1
);
/* 获取参数 */
$size
=
isset
(
self
::
$params
[
'size'
])
?
htmlspecialchars
(
self
::
$params
[
'size'
])
:
$list_size
;
$start
=
isset
(
self
::
$params
[
'start'
])
?
htmlspecialchars
(
self
::
$params
[
'start'
])
:
0
;
$size
=
isset
(
self
::
$params
[
'size'
])
?
intval
(
self
::
$params
[
'size'
])
:
$list_size
;
$start
=
isset
(
self
::
$params
[
'start'
])
?
intval
(
self
::
$params
[
'start'
])
:
0
;
$end
=
$start
+
$size
;
// 参数
...
...
public/static/common/js/common.js
浏览文件 @
70dd60e0
...
...
@@ -1612,7 +1612,14 @@ function TableContainerInit()
$
(
'
.am-table-scrollable-horizontal tbody tr
'
).
each
(
function
(
k
,
v
)
{
// 容器
var
height
=
$
(
this
).
data
(
'
height
'
)
||
$
(
this
).
height
()
||
0
;
var
height
=
$
(
this
).
height
()
||
0
;
// 自定义高度,仅大于默认高度的时候有效
var
z_height
=
$
(
this
).
data
(
'
height
'
)
||
0
;
if
(
z_height
>
height
)
{
height
=
z_height
;
}
if
(
height
>
0
)
{
$
(
this
).
find
(
'
td
'
).
css
(
'
height
'
,
height
+
'
px
'
);
...
...
public/static/common/lib/ueditor/dialogs/scrawl/scrawl.css
浏览文件 @
70dd60e0
...
...
@@ -73,7 +73,7 @@ em{font-style: normal;}
/**
* 手机端自适应
*/
@media
only
screen
and
(
max-width
:
641
px
)
{
@media
only
screen
and
(
max-width
:
500
px
)
{
.main
{
width
:
calc
(
100%
-
16px
);
}
...
...
@@ -82,25 +82,35 @@ em{font-style: normal;}
}
.hot
,
.picBoard
{
width
:
100%
;
height
:
15
0px
;
height
:
34
0px
;
}
.picBoard
{
width
:
100%
;
}
.drawBoard
{
height
:
100%
;
height
:
300px
;
}
.brushBorad
{
width
:
100%
;
height
:
100%
}
.operateBar
{
width
:
5
0%
;
width
:
10
0%
;
}
.drawToolbar
{
height
:
185px
;
width
:
100%
;
height
:
110px
;
overflow
:
hidden
;
}
.drawToolbar
#J_colorBar
{
float
:
left
;
}
.drawToolbar
#J_colorBar
table
{
width
:
110px
;
}
.sectionBar
{
margin-top
:
6px
;
margin-top
:
5px
;
text-align
:
right
;
padding-right
:
10px
;
}
}
\ No newline at end of file
public/static/common/lib/ueditor/dialogs/scrawl/scrawl.html
浏览文件 @
70dd60e0
...
...
@@ -11,7 +11,7 @@
<div
class=
"main"
id=
"J_wrap"
>
<div
class=
"hot"
>
<div
class=
"drawBoard border_style1"
>
<canvas
id=
"J_brushBoard"
class=
"brushBorad"
></canvas>
<canvas
id=
"J_brushBoard"
class=
"brushBorad"
width=
"360"
height=
"300"
></canvas>
<div
id=
"J_picBoard"
class=
"picBoard"
style=
"width: 360px;height: 300px"
></div>
</div>
<div
id=
"J_operateBar"
class=
"operateBar"
>
...
...
public/static/common/lib/ueditor/dialogs/scrawl/scrawl.js
浏览文件 @
70dd60e0
...
...
@@ -14,6 +14,8 @@ var scrawl = function (options) {
drawStep
=
[],
//undo redo存储
drawStepIndex
=
0
;
//undo redo指针
//canvas.width = 400;
scrawl
.
prototype
=
{
isScrawl
:
false
,
//是否涂鸦
brushWidth
:
-
1
,
//画笔粗细
...
...
public/static/common/lib/ueditor/themes/default/css/ueditor.css
浏览文件 @
70dd60e0
...
...
@@ -1172,7 +1172,7 @@ div.edui-box {
/* 弹出对话框按钮和对话框大小 */
.edui-default
.edui-dialog
{
position
:
absolute
;
z-index
:
1210
!important
;
z-index
:
1210
;
}
.edui-dialog
div
{
...
...
@@ -1306,7 +1306,7 @@ div.edui-box {
filter
:
alpha
(
opacity
=
30
);
background-color
:
#ccc
;
position
:
absolute
;
z-index
:
1200
!important
;
z-index
:
1200
;
}
.edui-default
.edui-dialog-dragmask
{
...
...
@@ -1575,7 +1575,7 @@ div.edui-box {
margin-right
:
1px
;
font-size
:
12px
;
line-height
:
14px
;
height
:
14
px
;
height
:
20
px
;
border
:
1px
solid
#333
;
padding
:
3px
5px
;
cursor
:
pointer
;
...
...
public/static/common/lib/ueditor/ueditor.all.js
浏览文件 @
70dd60e0
...
...
@@ -8090,10 +8090,15 @@ UE.Editor.defaultOptions = function(editor){
'dataType': isJsonp ? 'jsonp':'',
'onsuccess':function(r){
try {
var config = isJsonp ? r:eval("("+r.responseText+")");
utils.extend(me.options, config);
me.fireEvent('serverConfigLoaded');
me._serverConfigLoaded = true;
var res = isJsonp ? r:eval("("+r.responseText+")");
if(res.code == 0)
{
utils.extend(me.options, res.data);
me.fireEvent('serverConfigLoaded');
me._serverConfigLoaded = true;
} else {
showErrorMsg(res.msg);
}
} catch (e) {
showErrorMsg(me.getLang('loadconfigFormatError'));
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录