fix(前端): 修复编辑账号错误提示无法显示具体原因的问题

后端 API 返回 message 字段,但前端读取 detail 字段,导致无法显示具体错误信息。
现在优先读取 message 字段,兼容 detail 字段。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
yangjianbo
2026-01-06 15:46:36 +08:00
parent 58b1777198
commit 1181b332f7

View File

@@ -1140,7 +1140,7 @@ const handleSubmit = async () => {
emit('updated')
handleClose()
} catch (error: any) {
appStore.showError(error.response?.data?.detail || t('admin.accounts.failedToUpdate'))
appStore.showError(error.response?.data?.message || error.response?.data?.detail || t('admin.accounts.failedToUpdate'))
} finally {
submitting.value = false
}