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;