diff --git a/pages/index/index.vue b/pages/index/index.vue index a88aeb5..565b749 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -80,16 +80,22 @@ {{item.start_time+'-'+item.end_time}} - - {{item.remain_count}}张 - - 售罄 + + + + {{item.remain_count}}张 + + 售罄 + + + 不可预约 + @@ -274,14 +280,17 @@ } cdate.checked = true; - this.loadDefaultTime(cdate.rules); this.currentDate = cdate; + this.loadDefaultTime(cdate.rules); this.listDatePrice = list; this.$forceUpdate(); }, handleSelectTime(index) { - var mod = this.currentDate.rules[index]; + var mod = this.currentDate.rules[index]; + if (!mod.isCanbook) { + return false + } if (mod.remain_count == 0) { this.util.toast("该时段已售罄"); return false @@ -452,12 +461,15 @@ }, loadDefaultTime(rules) { var that = this; + var nt = new Date(); that.currentTime = {}; let isDefault = false; for (var mod of rules) { mod.checked = false; - - if (!isDefault && mod.remain_count > 0) { + mod.endtime = that.currentDate.date + " " + mod.end_time; + var isCanbook = that.$moment(nt).isBefore(mod.endtime); + mod.isCanbook = isCanbook; + if (!isDefault && mod.remain_count > 0 && isCanbook) { isDefault = true; mod.checked = true; that.currentTime = mod; diff --git a/pages/order/activityorderinfo.vue b/pages/order/activityorderinfo.vue index ff66fc3..1bcb880 100644 --- a/pages/order/activityorderinfo.vue +++ b/pages/order/activityorderinfo.vue @@ -86,8 +86,8 @@ canvasId: 'qrcode', componentInstance: this, text: text, - size: 150, - margin: 0, + size: 140, + margin: 10, backgroundColor: '#ffffff', foregroundColor: '#000000', fileType: 'jpg', @@ -228,8 +228,6 @@ } .imgs { - width: 273rpx; - height: 273rpx; margin: 30rpx 0 50rpx 0; font-size: 0; display: inline-block; diff --git a/pages/order/parkorder.vue b/pages/order/parkorder.vue index 91f4417..2d2d226 100644 --- a/pages/order/parkorder.vue +++ b/pages/order/parkorder.vue @@ -7,10 +7,11 @@ - + {{item.plate}} - 待参观 + {{item.status_name}} + @@ -30,7 +31,7 @@ 查看详情 - 取消 + 取消预约 @@ -58,7 +59,12 @@ }], current: 0, isloading: true, - listOrder: [] + listOrder: [], + statusArr: { + 0: "已取消", + 1: "待完成", + 2: "已完成" + } } }, onShow() { @@ -88,7 +94,7 @@ utilSuccess: function(res) { that.loadOrder() }, - utilFail: function(res) { + utilFail: function(res) { that.util.toast(res); } }) @@ -107,6 +113,9 @@ status: this.list[this.current].idx }, utilSuccess: function(res) { + for (var mod of res) { + mod.status_name = that.statusArr[mod.status]; + } that.listOrder = res; this.isloading = false; }, @@ -127,6 +136,15 @@ padding: 20rpx 0 0 0; } + .cancelStatus { + background: #CFCFCF !important; + } + + .cancelBox .fbtn { + background: #CFCFCF; + color: #828282; + } + .fbtn { background: #EF9525; border-radius: 8rpx; @@ -140,6 +158,10 @@ color: #828282; } + .cancelBox .iconfont { + color: #828282; + } + .iconfont { color: #6EAC97; margin-right: 20rpx; diff --git a/pages/order/visitorder.vue b/pages/order/visitorder.vue index 99f4cf9..9e0a824 100644 --- a/pages/order/visitorder.vue +++ b/pages/order/visitorder.vue @@ -36,7 +36,7 @@ 取消 + @click.stop="tocancel(item.id)">取消预约 查看详情 diff --git a/pages/park/index.vue b/pages/park/index.vue index 848cf24..c979ca8 100644 --- a/pages/park/index.vue +++ b/pages/park/index.vue @@ -56,7 +56,8 @@ - + 选择信息:{{selectInfo.info||"暂未选择"}} @@ -83,7 +84,7 @@ + :color="(item.checked?'#EF9525':'#828282')"> {{$u.timeFormat(new Date(item.date), 'mm月dd日')}} @@ -100,7 +101,7 @@ + :color="(item.checked?'#EF9525':'#828282')"> 活动时间:{{item.activity.start_time}} @@ -360,6 +361,10 @@ width: 96%; } + .box-tiptxt { + font-size: 28rpx; + } + .footer { position: fixed; bottom: 0; diff --git a/pages/visit/book.vue b/pages/visit/book.vue index 87b1041..e88080e 100644 --- a/pages/visit/book.vue +++ b/pages/visit/book.vue @@ -590,6 +590,7 @@ this.load3Day(date, function(isCanbook) { if (isCanbook) { that.showCalendar = false; + that.bcurrentTime = null; } else { that.util.toast("您选择的日期不可预约") } @@ -630,7 +631,7 @@ var nt = this.$moment().format("yyyy-MM-DD"); let list = this.listDatePrice; let cdate = list[index]; - + if (cdate.is_open === 0) { uni.showToast({ icon: "none", @@ -653,9 +654,9 @@ } cdate.checked = true; + this.currentDate = cdate; this.loadDefaultTime(cdate.rules); - this.currentDate = cdate; this.listDatePrice = list; this.$forceUpdate(); }, @@ -752,11 +753,19 @@ for (var mod of rules) { mod.checked = false; - if (!isDefault && mod.remain_count > 0) { - isDefault = true; - mod.checked = true; - that.currentTime = mod; + if (that.bcurrentTime) { + if (that.bcurrentTime.id == mod.id) { + mod.checked = true; + that.currentTime = that.bcurrentTime; + } + } else { + if (!isDefault && mod.remain_count > 0) { + isDefault = true; + mod.checked = true; + that.currentTime = mod; + } } + } }, diff --git a/static/css/iconfont.css b/static/css/iconfont.css index 8d5af18..739314b 100644 --- a/static/css/iconfont.css +++ b/static/css/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: 'iconfont'; /* Project id 3356385 */ - src: url('//at.alicdn.com/t/font_3356385_v6nfjk6rvl.woff2?t=1652365280374') format('woff2'), - url('//at.alicdn.com/t/font_3356385_v6nfjk6rvl.woff?t=1652365280374') format('woff'), - url('//at.alicdn.com/t/font_3356385_v6nfjk6rvl.ttf?t=1652365280374') format('truetype'); + src: url('https://at.alicdn.com/t/font_3356385_sqfmhev64k.woff2?t=1654076004192') format('woff2'), + url('https://at.alicdn.com/t/font_3356385_sqfmhev64k.woff?t=1654076004192') format('woff'), + url('https://at.alicdn.com/t/font_3356385_sqfmhev64k.ttf?t=1654076004192') format('truetype'); } .iconfont { @@ -13,6 +13,22 @@ -moz-osx-font-smoothing: grayscale; } +.icon-checkboxweixuanzhongxiao:before { + content: "\e933"; +} + +.icon-ditu:before { + content: "\e61a"; +} + +.icon-icon_xuzhixiao:before { + content: "\e639"; +} + +.icon-ziyuan:before { + content: "\e614"; +} + .icon-lianxiwomen:before { content: "\e608"; }