From 7fa16c034c7de709dc82c402dac1dda0a37e0434 Mon Sep 17 00:00:00 2001 From: Guarp Date: Sat, 8 Mar 2025 15:59:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=8D=9A=E5=AE=A2=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Editor.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/Editor.vue b/src/pages/Editor.vue index d50a818..fddef79 100644 --- a/src/pages/Editor.vue +++ b/src/pages/Editor.vue @@ -255,7 +255,11 @@ const submitBlog = async () => { const tempURL = api.defaults.baseURL; api.defaults.baseURL = submitURL; - api.post('', formData).then(response => { + api.post('', formData, { + headers: { + "Content-Type": "multipart/form-data", + }, + }).then(response => { if (response.code === 0) { swal.window('success', '提交成功',`博客id: ${response.blogId || '未找到blogId字段'}`,'ok','好的'); return;