feat: 接口错误处理增强,统一打印并展示后端错误信息
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
85523109f6
commit
8d69249147
@@ -135,8 +135,9 @@ Component({
|
||||
}))
|
||||
this.setData({ members })
|
||||
})
|
||||
.catch(() => {
|
||||
wx.showToast({ title: '加载失败', icon: 'none' })
|
||||
.catch((err: any) => {
|
||||
console.error('[selectMemberDrawer] 加载成员失败:', err)
|
||||
wx.showToast({ title: err?.msg || err?.message || '加载失败', icon: 'none' })
|
||||
})
|
||||
.finally(() => {
|
||||
wx.hideLoading()
|
||||
@@ -159,8 +160,9 @@ Component({
|
||||
}))
|
||||
this.setData({ members })
|
||||
})
|
||||
.catch(() => {
|
||||
wx.showToast({ title: '加载失败', icon: 'none' })
|
||||
.catch((err: any) => {
|
||||
console.error('[selectMemberDrawer] 加载成员失败:', err)
|
||||
wx.showToast({ title: err?.msg || err?.message || '加载失败', icon: 'none' })
|
||||
})
|
||||
.finally(() => {
|
||||
wx.hideLoading()
|
||||
|
||||
Reference in New Issue
Block a user