From 56a9515009fa3f9b6f218cc0ea4986b562136cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Tue, 23 May 2023 09:57:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/appointmenttime/appointmenttime.vue | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/pages/appointmenttime/appointmenttime.vue b/pages/appointmenttime/appointmenttime.vue index 994407b..b1745ba 100644 --- a/pages/appointmenttime/appointmenttime.vue +++ b/pages/appointmenttime/appointmenttime.vue @@ -144,6 +144,7 @@ }, data() { return { + timer: null, Soonerorlater: 'morning', timecurrent: 0, //时间下标 openid: '', @@ -337,16 +338,30 @@ title: '预约成功', type: 'success', duration: 1500, - url: `/pages/paysuccess/paysuccess` }) + if (that.timer) { + clearTimeout(that.timer) + } + that.timer = setTimeout(e => { + uni.redirectTo({ + url: `/pages/paysuccess/paysuccess` + }) + }, 1500) }, fail: function(err) { that.$refs.uToast.show({ title: '取消预约', type: 'error', duration: 1500, - url: `/pages/menttimeorder/menttimeorder?list=${JSON.stringify(obj)}` }) + if (that.timer) { + clearTimeout(that.timer) + } + that.timer = setTimeout(e => { + uni.redirectTo({ + url: `/pages/menttimeorder/menttimeorder?list=${JSON.stringify(obj)}` + }) + }, 1500) } }); } else {