|
@@ -299,18 +299,22 @@ Page({
|
|
duration: this.data.timeActive,
|
|
duration: this.data.timeActive,
|
|
addressId: this.data.addressId
|
|
addressId: this.data.addressId
|
|
}
|
|
}
|
|
|
|
+ var timer = null
|
|
submitAppointment(data).then(res => {
|
|
submitAppointment(data).then(res => {
|
|
wx.hideLoading()
|
|
wx.hideLoading()
|
|
wx.showToast({
|
|
wx.showToast({
|
|
title: '预约成功',
|
|
title: '预约成功',
|
|
icon: 'success'
|
|
icon: 'success'
|
|
})
|
|
})
|
|
- this.setData({
|
|
|
|
|
|
+ timer = setTimeout(() => {
|
|
|
|
+ wx.navigateTo({
|
|
|
|
+ url: '/pages/myAppointment/myAppointment?from=appointment',
|
|
|
|
+ })
|
|
|
|
+ clearTimeout(timer)
|
|
|
|
+ }, 1000);
|
|
|
|
+ /* this.setData({
|
|
appointmentSuccess: true
|
|
appointmentSuccess: true
|
|
- })
|
|
|
|
- wx.navigateTo({
|
|
|
|
- url: '/pages/appointment/appointment?form=appoointment',
|
|
|
|
- })
|
|
|
|
|
|
+ }) */
|
|
}).catch(e => {
|
|
}).catch(e => {
|
|
wx.hideLoading()
|
|
wx.hideLoading()
|
|
wx.showModal({
|
|
wx.showModal({
|