fix(wechat): 协议挂起请求仅在离开页面时结算并集中映射错误文案
自动发布开发环境 Nacos 配置 / publish (push) Successful in 18s

This commit is contained in:
2026-11-05 10:51:40 +08:00
parent 3f825682fb
commit 942718b8d9
20 changed files with 141 additions and 70 deletions
+5 -4
View File
@@ -6,6 +6,7 @@ const { uploadProfileImage } = require('../../utils/upload')
const { normalizeAvatar } = require('../../utils/profile-card')
const profileCache = require('../../utils/profile-cache')
const employeesApi = require('../../api/employees')
const { showErrorToast } = require('../../utils/toast')
function canCreateAppointment() {
const app = getApp()
@@ -287,7 +288,7 @@ Page({
'profileForm.avatarFileId': uploaded && uploaded.fileId ? String(uploaded.fileId) : ''
})
} catch (error) {
wx.showToast({ title: error.message || '头像上传失败', icon: 'none' })
showErrorToast(error, '头像上传失败')
} finally {
this.setData({ profileSaving: false })
}
@@ -313,7 +314,7 @@ Page({
this.setData({ profilePromptVisible: false })
wx.showToast({ title: '资料已保存', duration: 3000 })
} catch (error) {
wx.showToast({ title: error.message || '资料保存失败', icon: 'none', duration: 3000 })
showErrorToast(error, '资料保存失败', { duration: 3000 })
} finally {
this.setData({ profileSaving: false })
}
@@ -872,7 +873,7 @@ Page({
wx.showToast({ title: Number(event.currentTarget.dataset.status) === 2 ? '补单已完成' : '预约已确认', icon: 'success' })
this.loadCalendar()
} catch (error) {
wx.showToast({ title: error.message || '预约状态更新失败', icon: 'none' })
showErrorToast(error, '预约状态更新失败')
}
},
@@ -903,7 +904,7 @@ Page({
wx.showToast({ title: '预约已取消', icon: 'success' })
this.loadCalendar()
} catch (error) {
wx.showToast({ title: error.message || '预约取消失败', icon: 'none' })
showErrorToast(error, '预约取消失败')
}
}
})