From 6882a26ad1ee26a1c5dbf086a9f2984542ca597d Mon Sep 17 00:00:00 2001 From: nige Date: Thu, 27 Jul 2023 18:01:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=9A=E7=89=A9=E9=A6=86=E9=A2=84=E7=BA=A6?= =?UTF-8?q?=20=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/myCalendar/index.js | 3 + pages/component/myCalendar/index.wxml | 6 +- pages/order/components/date/index.wxml | 9 +- pages/order/movie/index.js | 22 +++- pages/order/movie/index.wxml | 153 ++++++++++++++----------- pages/order/movie/index.wxss | 101 +++++++++++++++- pages/order/orderList/index.wxss | 1 - pages/user/cartlist/list.js | 24 +++- pages/user/cartlist/list.wxml | 23 +++- pages/user/cartlist/list.wxss | 67 ++++++++++- utils/filter.wxs | 17 ++- 11 files changed, 345 insertions(+), 81 deletions(-) diff --git a/pages/component/myCalendar/index.js b/pages/component/myCalendar/index.js index d338df6..3890b73 100644 --- a/pages/component/myCalendar/index.js +++ b/pages/component/myCalendar/index.js @@ -144,6 +144,9 @@ Component({ onTapDay:function(e){ let date = e.currentTarget.dataset.date; console.log(date) + if (date.stock==-1||date.stock==null) { + return + } if(!date || date.price===null || date.stock==null || date.stock==0) return; this.triggerEvent("onTapDay",date) }, diff --git a/pages/component/myCalendar/index.wxml b/pages/component/myCalendar/index.wxml index 4f32041..e6aa9c1 100644 --- a/pages/component/myCalendar/index.wxml +++ b/pages/component/myCalendar/index.wxml @@ -11,11 +11,11 @@ - + {{item.dateNum}} - ¥{{dates[item.date].price==0 || isKj?'免费':(dates[item.date].price/100)}} - + ¥{{dates[item.date].price==0 || isKj?'免费':(dates[item.date].price/100)}} + {{dates[item.date].tipText?dates[item.date].tipText:'售罄'}} diff --git a/pages/order/components/date/index.wxml b/pages/order/components/date/index.wxml index aa27875..13a90d3 100644 --- a/pages/order/components/date/index.wxml +++ b/pages/order/components/date/index.wxml @@ -1,10 +1,11 @@ + 使用日期 - - {{item.date}} - 不可定 + + {{tool.showAllSeldDate(item.date,index)}} + 不可定 {{item.price==0 || kjIdCom?'免费':('¥'+item.price/100)}} {{item.tipText?item.tipText:'售罄'}} @@ -18,7 +19,7 @@ - {{item.start_time}}-{{item.end_time}} 有票 售罄不可定({{'余票'+item.stock_number}}) + {{item.start_time}}-{{item.end_time}} 有票 售罄 不可定({{'余票'+item.stock_number}}) - - - - {{product.info.movieName}} - {{product.info.show_date}} {{product.info.show_time}}-{{product.info.close_time}} {{'('+product.info.show_version+')'}} - - {{product.info.cinemaName}} - {{product.info.hallName}} {{product.info.selectSeatInfo.seatInfo}} - - + + + + {{product.info.movieName}} + {{product.info.show_date}} {{product.info.show_time}}-{{product.info.close_time}} {{'('+product.info.show_version+')'}} + + {{product.info.cinemaName}} + {{product.info.hallName}} {{product.info.selectSeatInfo.seatInfo}} + + - - - - 不支持退票 - - - - - - 不支持改签 - - + + + + 不支持退票 + + + + + + 不支持改签 + + - 手机号码: - - - - - + 手机号码: + + + - - - 费用明细 - - - ¥{{price/100}} - - - - - 票价 - - - ¥{{sPrice}} x {{num}} - - - - - 优惠券 - - - - ¥{{coupon?coupon.activity.money/100:0}} - - - - - - - 订单总额:¥{{((price - (coupon?coupon.activity.money:0))>0?(price - (coupon?coupon.activity.money:0)):0)/100}} - - + + + 费用明细 + + + ¥{{price/100}} + + + + + 票价 + + + ¥{{sPrice}} x {{num}} + + + + + 优惠券 + + + - ¥{{coupon?coupon.activity.money/100:0}} + + + + + + + 订单总额:¥{{((price - (coupon?coupon.activity.money:0))>0?(price - (coupon?coupon.activity.money:0)):0)/100}} + + - - ¥0 - ¥{{((price - (coupon?coupon.activity.money:0))>0?(price - (coupon?coupon.activity.money:0)):0)/100}} - 总计优惠{{coupon?coupon.activity.money/100:0}}元 - - 明细 - 立即付款 + + ¥0 + ¥{{((price - (coupon?coupon.activity.money:0))>0?(price - (coupon?coupon.activity.money:0)):0)/100}} + 总计优惠{{coupon?coupon.activity.money/100:0}}元 + + 明细 + 立即付款 + + + + + + 退改须知 + + + 该产品一经购买,不支持退票/改签, 您的订单页面会显示【不支持退票】【不支持改签】提示,此时 平台无法为您处理退。 请您提前规划好出行时间,按时观影。 + + + + + 我已认可此规则 + + + + 继续购票 + + + 暂不购票 + + \ No newline at end of file diff --git a/pages/order/movie/index.wxss b/pages/order/movie/index.wxss index 8b58f41..044ca49 100644 --- a/pages/order/movie/index.wxss +++ b/pages/order/movie/index.wxss @@ -183,4 +183,103 @@ page { } .fix-info.hide{ bottom:-300rpx; -} \ No newline at end of file +} + +.mask { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: rgba(0, 0, 0, 0.5); + z-index: 999; + } + .model{ + width: 600rpx; + min-height: 667rpx; + background: #FFFFFF; + border-radius: 20rpx; + position: absolute; + box-sizing: border-box; + + } + .model-title{ + text-align: center; + font-size: 34rpx; + font-family: PingFang SC; + font-weight: bold; + color: #333333; + margin-top: 40rpx; + box-sizing: border-box; + + } + .model-content{ + margin-top:44rpx; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 500; + color: rgba(102, 102, 102, 1); + padding: 0 45rpx; + line-height: 51rpx; + } + .btn-send{ + + width: 440rpx; + height: 87rpx; + + color: #FFFFFF; +background: #CCCCCC; + border-radius: 43rpx; + margin: 0 auto; + margin-top: 40rpx; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: bold; + line-height: 87rpx; + text-align: center; + + } + .model-content text{ + color: #D62828; + font-weight: bold; + } + .select-btn{ + display: flex; + align-items: center; + justify-content: center; + margin-top:90rpx; + } + .select-btn image{ + width: 33.33rpx; + height: 33.33rpx; + } + .select-text{ + margin-left: 19rpx; + font-size: 28rpx; + font-family: PingFang SC; + font-weight: 500; + color: #666666; + + } + .btn-close{ + position: absolute; + bottom: -70rpx; + text-align: center; + width: 100%; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: bold; + color: #FFFFFF; + } + .close-img{ + width: 33.33rpx; + height: 33.33rpx; + position: absolute; + right: 32rpx; + top: 30rpx; + } + .btn-send.send{ + background: #D62828; + color: #FFFFFF; + + } \ No newline at end of file diff --git a/pages/order/orderList/index.wxss b/pages/order/orderList/index.wxss index 5685983..17386b9 100644 --- a/pages/order/orderList/index.wxss +++ b/pages/order/orderList/index.wxss @@ -61,5 +61,4 @@ page{ align-items: center; background-color: #fff; margin: 30rpx 25rpx; - } \ No newline at end of file diff --git a/pages/user/cartlist/list.js b/pages/user/cartlist/list.js index 4c7bbc2..5c4dfc4 100644 --- a/pages/user/cartlist/list.js +++ b/pages/user/cartlist/list.js @@ -23,7 +23,8 @@ Page({ flag: false, //判断订单是否同时有商品和票 isCar: 'single', //判断是否购物车 showQrCode: false, - wxqrcode: null + wxqrcode: null, + showModel:false }, /** @@ -222,6 +223,27 @@ Page({ }) }, + checkOrder(){ + console.log(this.data.list); + let list = this.data.list,product = [] + list.map(item => { + if (item.checked) { + product.push(item) + } + }) + if (product.length>1) { + this.setData({ + showModel:true + }) + }else{ + this.order() + } + }, + closeModel(){ + this.setData({ + showModel:false + }) + }, touchStart(e) { //移动前点击的位置 console.log(e) // 在开始触摸时将所有startTouchMove设置为flase,对当前的为true diff --git a/pages/user/cartlist/list.wxml b/pages/user/cartlist/list.wxml index c8478c6..0db4975 100644 --- a/pages/user/cartlist/list.wxml +++ b/pages/user/cartlist/list.wxml @@ -34,7 +34,7 @@ ¥{{allPrice/100}} - 去下单 + 去下单 @@ -43,4 +43,23 @@ 删除 - \ No newline at end of file + + + + + 购买须知 + + + 多产品订单一经购买 + 不支持部分退改 + + + + 取消 + + + 确定 + + + + diff --git a/pages/user/cartlist/list.wxss b/pages/user/cartlist/list.wxss index 4f59ab3..c5c40fd 100644 --- a/pages/user/cartlist/list.wxss +++ b/pages/user/cartlist/list.wxss @@ -174,4 +174,69 @@ page { color: #FB6E4D; background: white; margin-right:40rpx ; -} \ No newline at end of file +} + .mask { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: rgba(0, 0, 0, 0.5); + z-index: 999; + } + .model{ + width: 561rpx; + min-height: 449rpx; + background: #FFFFFF; + border-radius: 13rpx; + position: absolute; + box-sizing: border-box; + + } + .model-title{ + text-align: center; + font-size: 34rpx; + font-family: PingFang SC; + font-weight: bold; + color: #333333; + margin-top: 32rpx; + box-sizing: border-box; + + } + .model-content{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + flex-wrap: wrap; + margin-top: 100rpx; + font-size: 34rpx; + font-family: PingFang SC; + font-weight: 500; + color: #333333; + } + .btn-list{ + height: 106rpx; + width: 100%; + position: absolute; + bottom: 0; + border-top: 1rpx solid rgba(216, 216, 216, .99); + padding: 10rpx; + box-sizing: border-box; + display: flex; + justify-content: space-between; + align-items: center; + + } + .model-btn{ + width: 50%; + text-align: center; + height: 86rpx; + line-height: 86rpx; + + font-size: 34rpx; + font-family: PingFang SC; + font-weight: 500; + color: #333333; + } + diff --git a/utils/filter.wxs b/utils/filter.wxs index abc5cd1..8fe5028 100644 --- a/utils/filter.wxs +++ b/utils/filter.wxs @@ -25,11 +25,26 @@ var gotoUrl = function(item){ str += "/index?id="+item.id; return str; } + // 价格日历显示返回 +var showAllSeldDate = function (date, index) { + // return date.substring(5, 10) + switch (index) { + case 0: + return '今天' + date.substring(5, 10) + case 1: + return '明天' + date.substring(5, 10) + case 2: + return '后天' + date.substring(5, 10) + default: + return date.substring(5, 10) + } + } var toFix = function(value) { return (value / 100).toFixed(2); }; module.exports = { formateRichText:formateRichText, gotoUrl:gotoUrl, - toFix:toFix + toFix:toFix, + showAllSeldDate:showAllSeldDate }; \ No newline at end of file