diff --git a/src/pages/Editor.vue b/src/pages/Editor.vue index 1bab9d0..ded30ce 100644 --- a/src/pages/Editor.vue +++ b/src/pages/Editor.vue @@ -264,10 +264,10 @@ const submitBlog = async () => { swal.window('success', '提交成功',`博客id: ${response.blogId || '未找到blogId字段'}`,'ok','好的'); return; } - swal.tip('error', '提交失败, code字段不为0') + swal.window('error', '错误', `code${ ('为' + response.code) || '未返回'}\n返回信息: ${response.message}`, 'ok','好的'); }).catch((e) => { - swal.window('error', '错误', `${e.message}\n${e.code}`, 'ok','ok') - swal.tip('error', `${e.message}\n${e.code}`) + + swal.tip('error', `${e.message}\n${e.code}`); }); api.defaults.baseURL = tempURL;