Commit 1181b332 authored by yangjianbo's avatar yangjianbo
Browse files

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

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

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

)
Co-Authored-By: default avatarClaude Opus 4.5 <noreply@anthropic.com>
parent 58b17771
...@@ -1140,7 +1140,7 @@ const handleSubmit = async () => { ...@@ -1140,7 +1140,7 @@ const handleSubmit = async () => {
emit('updated') emit('updated')
handleClose() handleClose()
} catch (error: any) { } 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 { } finally {
submitting.value = false submitting.value = false
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment