|
@@ -1,16 +1,10 @@
|
|
|
<template>
|
|
|
<div class="content_1111">
|
|
|
- <Editor
|
|
|
- api-key="nfaxt3iz0ciqr1yg7zxzifvksvval28yl46wr1n0847mt0d3"
|
|
|
- :init="init"
|
|
|
- v-model="content"
|
|
|
- :disabled="disabled"
|
|
|
- ref="tinymce"
|
|
|
- />
|
|
|
+ <Editor api-key="nfaxt3iz0ciqr1yg7zxzifvksvval28yl46wr1n0847mt0d3" :init="init" v-model="content" :disabled="disabled" ref="tinymce" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script setup name="TinymceEditor">
|
|
|
+<script setup>
|
|
|
import Editor from "@tinymce/tinymce-vue";
|
|
|
import { getToken } from "/src/utils/auth";
|
|
|
|
|
@@ -69,26 +63,19 @@ const init = reactive({
|
|
|
return;
|
|
|
} else {
|
|
|
const file = blobInfo.blob();
|
|
|
- proxy
|
|
|
- .post("/fileInfo/getSing", { fileName: blobInfo.filename() })
|
|
|
- .then((res) => {
|
|
|
- const otherData = res.uploadBody;
|
|
|
- const formData = new FormData();
|
|
|
- for (const key in otherData) {
|
|
|
- formData.append(key, otherData[key]);
|
|
|
+ proxy.post("/fileInfo/getSing", { fileName: blobInfo.filename() }).then((res) => {
|
|
|
+ const otherData = res.uploadBody;
|
|
|
+ const formData = new FormData();
|
|
|
+ for (const key in otherData) {
|
|
|
+ formData.append(key, otherData[key]);
|
|
|
+ }
|
|
|
+ formData.append("file", file);
|
|
|
+ proxy.post("https://winfaster.obs.cn-south-1.myhuaweicloud.com", formData).then((data) => {
|
|
|
+ if (res && typeof res.fileUrl == "string" && res.fileUrl) {
|
|
|
+ resolve(res.fileUrl);
|
|
|
}
|
|
|
- formData.append("file", file);
|
|
|
- proxy
|
|
|
- .post(
|
|
|
- "https://winfaster.obs.cn-south-1.myhuaweicloud.com",
|
|
|
- formData
|
|
|
- )
|
|
|
- .then((data) => {
|
|
|
- if (res && typeof res.fileUrl == "string" && res.fileUrl) {
|
|
|
- resolve(res.fileUrl);
|
|
|
- }
|
|
|
- });
|
|
|
});
|
|
|
+ });
|
|
|
}
|
|
|
}),
|
|
|
images_upload_base_path: "/demo",
|