From 3d7553ca612febf114ac7c14df8f4bbe87306d0c Mon Sep 17 00:00:00 2001 From: Guarp Date: Sat, 8 Mar 2025 13:05:05 +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, 3 insertions(+), 3 deletions(-) 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;