diff --git a/public/static/plugs/easy-admin/easy-admin.js b/public/static/plugs/easy-admin/easy-admin.js index e937097..1e355d5 100644 --- a/public/static/plugs/easy-admin/easy-admin.js +++ b/public/static/plugs/easy-admin/easy-admin.js @@ -1668,6 +1668,7 @@ define(["jquery", "tableSelect", "miniTheme", "xmSelect", "lazyload"], function html: $(this).text(), config: { MENU_CONF: { + // 上传图片 uploadImage: { server: window.CONFIG.ADMIN_UPLOAD_URL, fieldName: 'file', @@ -1685,6 +1686,23 @@ define(["jquery", "tableSelect", "miniTheme", "xmSelect", "lazyload"], function let href = '' insertFn(url, alt, href) } + }, + // 上传视频 + uploadVideo: { + server: window.CONFIG.ADMIN_UPLOAD_URL, + fieldName: 'file', + meta: {editor: 'editor',}, + async customInsert(res, insertFn) { + let code = res.code || 0 + if (code != '1') { + layer.msg(res.msg || '上传失败', {icon: 2}); + return + } + let url = res.data?.url || '' + let alt = '' + let href = '' + insertFn(url, alt, href) + } } }, }