This commit is contained in:
@@ -135,13 +135,17 @@ Page({
|
||||
async dialCustomer() {
|
||||
const appointment = this.data.appointment || {}
|
||||
if (this.data.dialing) return
|
||||
if (!appointment.customerPhoneAvailable || !appointment.customerId || !appointment.orderId) {
|
||||
if (!appointment.customerPhoneAvailable || !appointment.orderId) {
|
||||
wx.showToast({ title: '该客户暂无可拨打的手机号', icon: 'none' })
|
||||
return
|
||||
}
|
||||
this.setData({ dialing: true })
|
||||
try {
|
||||
const result = await customersApi.dialCustomer(appointment.customerId, appointment.orderId)
|
||||
const result = await customersApi.dialCustomer({
|
||||
customerId: appointment.customerId,
|
||||
appointmentId: appointment.orderItemId,
|
||||
orderId: appointment.orderId
|
||||
})
|
||||
if (!result || !result.dialNumber) {
|
||||
throw new Error('未获取到可拨打号码')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user