富文本图片上传

This commit is contained in:
walkor 2023-05-10 14:54:37 +08:00
parent b5c8abcb56
commit 3d39d38287
2 changed files with 5 additions and 2 deletions

View File

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

View File

@ -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"]);
} }
} }
}; };