郭庆泰andClaude 0f1d130397 fix(expert): 编辑保存失败 Updates:0 + 错误 toast 弹两次
两个根因:

1. 后端 Updates: 0
   - ExpertNew.vue (admin+manager) onSave 编辑分支里 delete payload.expertId
   - 后端 BizExpertMapper.updateByPrimaryKey 是 where expert_id = #{expertId}
   - 没有 expertId → WHERE 不匹配 → 0 updates → 抛 "操作失败" 500
   - 修复: 不再 delete expertId (后端 insert/update 都依赖该字段)

2. 前端操作失败弹两次
   - request.js 响应拦截器在 code != 200 时自动 ElMessage.error
   - onSave 的 catch 又 ElMessage.error 一次
   - 修复: 加 __silentError 请求配置项, 拦截器遇此 flag 不自动 toast
   - api/public.js bizAdd/bizUpdate 加第 3 参数 opts 透传给 request
   - ExpertNew.vue onSave 调用时传 __silentError: true, 由 catch 块按业务语义
     决定 黄警 (手机号重复) 还是 红错 (其它)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-17 00:43:40 +08:00
S
Description
No description provided
20 MiB
Languages
Java 43.8%
Vue 26.8%
HTML 26%
Python 1.3%
JavaScript 1.2%
Other 0.8%