Browse Source

富文本上传地址更换

cz 1 year ago
parent
commit
f383657f71
1 changed files with 6 additions and 17 deletions
  1. 6 17
      src/components/Editor/TinymceEditor.vue

+ 6 - 17
src/components/Editor/TinymceEditor.vue

@@ -1,12 +1,6 @@
 <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>
 
@@ -78,16 +72,11 @@ const init = reactive({
               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);
-                }
-              });
+            proxy.post(proxy.uploadUrl, formData).then((data) => {
+              if (res && typeof res.fileUrl == "string" && res.fileUrl) {
+                resolve(res.fileUrl);
+              }
+            });
           });
       }
     }),