diff --git a/src/plugins/httpInterceptors.ts b/src/plugins/httpInterceptors.ts index ed7f244..162bf5d 100644 --- a/src/plugins/httpInterceptors.ts +++ b/src/plugins/httpInterceptors.ts @@ -95,12 +95,22 @@ const response = { }, }); } else if (error.response.status === 500) { - dialog.error({ - title: "500 服务器错误", - content: () => { - return h(error500); - }, - }); + const m = error.response.data.error; + if (m) { + dialog.error({ + title: "500 服务器错误", + content: () => { + return m; + }, + }); + } else { + dialog.error({ + title: "500 服务器错误", + content: () => { + return h(error500); + }, + }); + } } return Promise.reject(error);