This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const planningApi = require('../../api/planning')
|
||||
const customersApi = require('../../api/customers')
|
||||
const { markPlanningRefresh } = require('../../utils/planning-refresh')
|
||||
const { showErrorToast } = require('../../utils/toast')
|
||||
|
||||
function displayValue(value, fallback) {
|
||||
if (value === null || value === undefined) return fallback
|
||||
@@ -99,7 +100,7 @@ Page({
|
||||
wx.showToast({ title: '已更新' })
|
||||
this.loadDetail()
|
||||
} catch (error) {
|
||||
wx.showToast({ title: error.message || '操作失败', icon: 'none' })
|
||||
showErrorToast(error, '操作失败')
|
||||
} finally {
|
||||
this.setData({ updating: false })
|
||||
}
|
||||
@@ -151,7 +152,7 @@ Page({
|
||||
}
|
||||
wx.makePhoneCall({ phoneNumber: result.dialNumber })
|
||||
} catch (error) {
|
||||
wx.showToast({ title: error.message || '取号失败', icon: 'none' })
|
||||
showErrorToast(error, '取号失败')
|
||||
} finally {
|
||||
this.setData({ dialing: false })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user