富文本图片上传
This commit is contained in:
parent
b5c8abcb56
commit
3d39d38287
@ -235,6 +235,9 @@ EOF;
|
|||||||
EOF;
|
EOF;
|
||||||
|
|
||||||
$options_string = '';
|
$options_string = '';
|
||||||
|
if (!isset($props['images_upload_url'])) {
|
||||||
|
$props['images_upload_url'] = '/app/admin/upload/image';
|
||||||
|
}
|
||||||
foreach ($props as $key => $item) {
|
foreach ($props as $key => $item) {
|
||||||
if (is_array($item)) {
|
if (is_array($item)) {
|
||||||
$item = json_encode($item, JSON_UNESCAPED_UNICODE);
|
$item = json_encode($item, JSON_UNESCAPED_UNICODE);
|
||||||
|
@ -25,9 +25,9 @@ layui.define(['jquery'],function (exports) {
|
|||||||
}
|
}
|
||||||
, success: function (res, succFun, failFun) {//图片上传完成回调 根据自己需要修改
|
, success: function (res, succFun, failFun) {//图片上传完成回调 根据自己需要修改
|
||||||
if (res[this.response.statusName] == this.response.statusCode.ok) {
|
if (res[this.response.statusName] == this.response.statusCode.ok) {
|
||||||
succFun(res[this.response.dataName]);
|
succFun(res[this.response.dataName]["url"]);
|
||||||
} else {
|
} else {
|
||||||
failFun(res[this.response.msgName]);
|
failFun(res[this.response.msgName]["url"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user