fix(wechat): 协议页切后台暂停超时计时并全量映射技术文案
This commit is contained in:
@@ -4,7 +4,7 @@ const customersApi = require('../../api/customers')
|
||||
const dateUtil = require('../../utils/date')
|
||||
const { markPlanningRefresh } = require('../../utils/planning-refresh')
|
||||
const { uploadObjectFile } = require('../../utils/upload')
|
||||
const { showErrorToast } = require('../../utils/toast')
|
||||
const { showErrorToast, toUserMessage } = require('../../utils/toast')
|
||||
|
||||
const DRAFT_STORAGE_PREFIX = 'managerAppointmentDraft'
|
||||
const DRAFT_TTL_MS = 7 * 24 * 60 * 60 * 1000
|
||||
@@ -759,7 +759,7 @@ Page({
|
||||
this.setData({
|
||||
products: [],
|
||||
filteredProducts: [],
|
||||
productError: error.message || '作品列表加载失败'
|
||||
productError: toUserMessage(error, '作品列表加载失败')
|
||||
})
|
||||
} finally {
|
||||
this.setData({ loadingProducts: false })
|
||||
@@ -828,8 +828,8 @@ Page({
|
||||
businessEndTime: '',
|
||||
selectedArtist: unassignedSelection,
|
||||
'form.artistId': '',
|
||||
artistError: error.message || '美甲师列表加载失败',
|
||||
conflictTip: error.message || '美甲师列表加载失败',
|
||||
artistError: toUserMessage(error, '美甲师列表加载失败'),
|
||||
conflictTip: toUserMessage(error, '美甲师列表加载失败'),
|
||||
conflictLevel: 'danger'
|
||||
})
|
||||
}
|
||||
@@ -862,7 +862,7 @@ Page({
|
||||
})
|
||||
this.refreshCustomerSuggestions(this.data.form.customerName, this.data.form.phone)
|
||||
} catch (error) {
|
||||
this.setData({ customerDirectory: [], customerOptions: [], customerError: error.message || '客户列表加载失败' })
|
||||
this.setData({ customerDirectory: [], customerOptions: [], customerError: toUserMessage(error, '客户列表加载失败') })
|
||||
} finally {
|
||||
this.setData({ customerLoading: false })
|
||||
}
|
||||
@@ -1013,7 +1013,7 @@ Page({
|
||||
customerError: ''
|
||||
})
|
||||
} catch (error) {
|
||||
this.setData({ customerOptions: [], customerError: error.message || '客户加载失败' })
|
||||
this.setData({ customerOptions: [], customerError: toUserMessage(error, '客户加载失败') })
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -1624,7 +1624,7 @@ Page({
|
||||
timePickerMinutes: [],
|
||||
selectedTimeCandidate: '',
|
||||
'form.appointmentTime': '',
|
||||
timeError: error.message || '营业时间加载失败',
|
||||
timeError: toUserMessage(error, '营业时间加载失败'),
|
||||
businessHoursMissing: false,
|
||||
timeLoading: false,
|
||||
timeSelectTip: '营业时间加载失败'
|
||||
@@ -1699,7 +1699,7 @@ Page({
|
||||
timePickerMinutes: [],
|
||||
selectedTimeCandidate: '',
|
||||
'form.appointmentTime': '',
|
||||
timeError: error.message || '可约时间加载失败',
|
||||
timeError: toUserMessage(error, '可约时间加载失败'),
|
||||
businessHoursMissing: false,
|
||||
timeSelectTip: '可约时间加载失败'
|
||||
})
|
||||
@@ -1869,7 +1869,7 @@ Page({
|
||||
this.setData({ conflictTip: tip, conflictLevel: 'free' })
|
||||
return { ok: true, tip }
|
||||
} catch (error) {
|
||||
const tip = error.message || '排班校验失败,请稍后重试'
|
||||
const tip = toUserMessage(error, '排班校验失败,请稍后重试')
|
||||
this.setData({ conflictTip: tip, conflictLevel: 'danger' })
|
||||
return { ok: false, tip }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user