diff --git a/src/pages/Editor.vue b/src/pages/Editor.vue index 881dbfa..589569a 100644 --- a/src/pages/Editor.vue +++ b/src/pages/Editor.vue @@ -253,9 +253,9 @@ const submitBlog = async () => { console.log(Object.fromEntries(formData.entries())); // 3️⃣ 发送请求 - axios.post(submitURL, formData).then(response => { - response = response.data; - console.log(response) + const testAxiosAPI = api; + testAxiosAPI.defaults.baseURL = submitURL; + testAxiosAPI.post('', formData).then(response => { if (response.code === 0) { swal.window('success', '提交成功',`博客id: ${response.blogId || '未找到blogId字段'}`,'ok','好的'); return;