From 557453cbfbb4f1af567e6fb5cc6d476b46375291 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Wed, 22 Jun 2022 15:10:31 +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/activity/book.vue | 104 +++++++++++++++++++--- pages/guide/index.vue | 72 ++++++++++++---- pages/order/activityorder.vue | 2 +- pages/order/activityorderinfo.vue | 15 ++-- pages/order/visitorder.vue | 2 +- pages/order/visitorderinfo.vue | 5 +- pages/park/book.vue | 123 +++++++++++++++++++++----- pages/visit/book.vue | 139 +++++++++++++++++++++++++----- 8 files changed, 379 insertions(+), 83 deletions(-) diff --git a/pages/activity/book.vue b/pages/activity/book.vue index 4e09e7f..b2b728b 100644 --- a/pages/activity/book.vue +++ b/pages/activity/book.vue @@ -206,6 +206,18 @@ 知道了 + + + + + + + + 您已经预约成功 + 即将跳转到活动预约 {{time}} s + + 返回首页 + @@ -213,7 +225,9 @@ - diff --git a/pages/guide/index.vue b/pages/guide/index.vue index bdb3d94..98fd211 100644 --- a/pages/guide/index.vue +++ b/pages/guide/index.vue @@ -2,26 +2,45 @@ - - 参观须知 + + + + + 参观须知 + + + - - - 常见问题 + + + + 常见问题 + + + + - - - 意见建议 + + + + + 意见建议 + + + + - diff --git a/pages/order/visitorderinfo.vue b/pages/order/visitorderinfo.vue index 6182d87..35aea2b 100644 --- a/pages/order/visitorderinfo.vue +++ b/pages/order/visitorderinfo.vue @@ -146,7 +146,7 @@ var that = this this.timer = setInterval(function(){ that.loadInfo(that.optionid); - },15000) + },1000) }, onHide() { @@ -204,6 +204,9 @@ utilSuccess: function(res) { that.info = res; that.detailsinfo = res.details; + if(res.status!=1){ + clearInterval(that.timer) + } if(res.type==1){ that.qrFun(res.code+"-"+"0"); setTimeout(function(){ diff --git a/pages/park/book.vue b/pages/park/book.vue index 04a85fe..cc02fe4 100644 --- a/pages/park/book.vue +++ b/pages/park/book.vue @@ -36,13 +36,16 @@ - + {{notice.name}} - - - + + + + + + 知道了 @@ -90,6 +93,17 @@ 确定 + + + + + + + 您已经预约成功 + 即将跳转到车位预约 {{time}} s + + 返回首页 + @@ -104,12 +118,18 @@ plate }, data() { - return { + return { + successshow: false, + time:3, showInfo: false, - showSelectorder: false, + showSelectorder: false, + maxheight:"", + scrollheight:"", selectInfo: "--", showSelecttime: false, - plateNumber: ['苏', 'E', '', '', '', '', ''], + plateNumber: ['苏', 'E', '', '', '', '', ''], + t:null, + timer:null, form: { plate: "", mobile: "", @@ -157,12 +177,29 @@ that.util.getUserInfo(function(r) { that.form.mobile = r.mobile; - }, true); + }, true); + + that.maxheight = wx.getSystemInfoSync().windowHeight*0.6 + "px" + that.scrollheight = wx.getSystemInfoSync().windowHeight*0.6*0.7 + "px" }, onShow() { + }, + onHide() { + clearInterval(this.t) + clearTimeout(this.timer) + }, + + onUnload() { + clearInterval(this.t) + clearTimeout(this.timer) }, - methods: { + methods: { + goHome(){ + uni.switchTab({ + url: "/pages/index/index" + }) + }, loadConfigInfo() { var that = this; this.util.request({ @@ -313,16 +350,28 @@ api: '/api/mobile/carpark/order', data: this.form, method: "POST", - utilSuccess: function(res) { - uni.showToast({ - icon: "none", - title: "下单成功", - complete() { - uni.redirectTo({ - url: "/pages/success/success?from=park&id=" + res.id - }) - } - }) + utilSuccess: function(res) { + that.successshow = true; + that.t = setInterval(function() { + if (that.time > 0) + that.time = that.time - 1; + }, 1000) + that.timer = setTimeout(function() { + uni.redirectTo({ + url: '/pages/order/parkorder' + }) + clearInterval(that.t); + clearTimeout(that.timer) + }, 3000) + // uni.showToast({ + // icon: "none", + // title: "下单成功", + // complete() { + // uni.redirectTo({ + // url: "/pages/success/success?from=park&id=" + res.id + // }) + // } + // }) }, utilFail: function(res) { that.util.toast(res); @@ -334,7 +383,7 @@ } - diff --git a/pages/visit/book.vue b/pages/visit/book.vue index 47f7c63..cb1bc86 100644 --- a/pages/visit/book.vue +++ b/pages/visit/book.vue @@ -249,16 +249,33 @@ - + + {{currentNotice.title}} - - - - + + + + + + + + 知道了 + + + + + + + + 您已经预约成功 + 即将跳转到参观预约 {{time}} s + + 返回首页 + 0) + that.time = that.time - 1; + }, 1000) + that.timer = setTimeout(function() { + uni.redirectTo({ + url: '/pages/order/visitorder' + }) + clearInterval(that.t); + clearTimeout(that.timer) + }, 3000) + + // uni.showToast({ + // icon: "none", + // title: "下单成功", + // complete() { + + // uni.redirectTo({ + // url: "/pages/success/success?from=visit&id=" + res.id + // }) + // } + // }) }, utilFail: function(res) { that.util.toast(res); @@ -907,7 +958,7 @@ } -