diff --git a/src/components/Tinymce.vue b/src/components/Tinymce.vue index 6d90cbd..b9a45b5 100644 --- a/src/components/Tinymce.vue +++ b/src/components/Tinymce.vue @@ -121,12 +121,6 @@ const init = reactive({ // }), }, file_picker_callback: (callback, value, meta) => { - console.info("🚀 ~method:uploadFile -----") - let loading= ElLoading.service({ - lock: true, - text: '文件上传中...', - background: 'rgba(0, 0, 0, 0.7)', - }) // 使用案例http://tinymce.ax-z.cn/general/upload-images.php // meta.filetype //根据这个判断点击的是什么file image media let filetype; //限制文件的上传类型,需要什么就添加什么的后缀 @@ -151,7 +145,11 @@ const init = reactive({ xhr.setRequestHeader( 'Authorization',getToken() ) - + let loading= ElLoading.service({ + lock: true, + text: '文件上传中...', + background: 'rgba(0, 0, 0, 0.7)', + }) xhr.onload = function() { let res; // if (xhr.status != 200) { @@ -166,7 +164,8 @@ const init = reactive({ }) loading.close() const fileUrl = res.data.url; - callback(fileUrl, { title: file.name }); + // '?fileId='+res.data.id+ + callback(fileUrl+'?fileName='+res.data.originalFilename, {title: file.name }); }; formData = new FormData(); formData.append('file', file, file.name ); diff --git a/src/views/article-management/detail.vue b/src/views/article-management/detail.vue index e11727f..e2b7951 100644 --- a/src/views/article-management/detail.vue +++ b/src/views/article-management/detail.vue @@ -10,7 +10,7 @@ -
+
@@ -19,12 +19,64 @@