From 60af351a79696155cb2c8979060a8e73159c724e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E5=B9=B3=E8=89=BA?= <52643018@qq.com> Date: Sat, 6 Nov 2021 19:44:25 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=20?= =?UTF-8?q?=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E9=A1=B5=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E8=A7=84=E6=A0=BC=E6=97=B6=E7=9A=84=E5=A4=84=E7=90=86=20?= =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=20=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E4=B8=8B=E5=8D=95=E9=A1=B5=E6=97=A5=E6=9C=9F=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=B9=B6=E4=BF=AE=E5=A4=8Dcheckbox=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goodsDetail/index.vue | 436 ++++++++++++++++++---------------- pages/order/confirm_order.vue | 39 ++- 2 files changed, 260 insertions(+), 215 deletions(-) diff --git a/pages/goodsDetail/index.vue b/pages/goodsDetail/index.vue index b33b3ea..b2cfafa 100644 --- a/pages/goodsDetail/index.vue +++ b/pages/goodsDetail/index.vue @@ -98,55 +98,58 @@ - - - - - - - - ¥{{ choose_date_orangilprice*buy_num || goods_detail.spec[type_index].original_price*buy_num}} - - - 使用时间:{{ go_date }} - - - 套餐类型 - - - {{item.name}} + + + + + + + + + + ¥{{ choose_date_orangilprice*buy_num || goods_detail.spec[type_index].original_price*buy_num}} - - - 使用时间 - - - 使用时间 + + 使用时间:{{ go_date }} + + + 套餐类型 + + + {{item.name}} - - - {{go_date}} - + + + 使用时间 + + + 使用时间 + + + + {{go_date}} + + - - - 数量 - - + + 数量 + + + + + + - - - - - - + + + - - - - - - - - - - ¥{{ total_hotel_orginalprice*buy_num || goods_detail.spec[type_index].original_price*buy_num }} - - - 酒店住房日期:{{live_date}}~{{leave_date}} 共{{totalLive}}晚 - - - 套餐类型 - - {{item.name}} + + + + + + + + + + + ¥{{ total_hotel_orginalprice*buy_num || goods_detail.spec[type_index].original_price*buy_num }} - - - - - 住店时间 + + 酒店住房日期:{{live_date}}~{{leave_date}} 共{{totalLive}}晚 + + + 套餐类型 + + {{item.name}} - - {{live_date}}~{{leave_date}} - + + + + + 住店时间 + + + {{live_date}}~{{leave_date}} + + - - - - - 到店时间 + + + + 到店时间 + + + {{arrive_date}} + + - - {{arrive_date}} - + + + 数量 + + - - - 数量 - - + + - - - - - + + + @@ -298,141 +304,145 @@ - - - - - - - ¥{{ choose_date_orangilprice*buy_num || goods_detail.spec[type_index].original_price*buy_num}} - - - 套餐类型:{{goods_detail.spec[type_index].name}} - - - 套餐类型 - - - {{item.name}} + + + + + + + + + ¥{{ choose_date_orangilprice*buy_num || goods_detail.spec[type_index].original_price*buy_num}} - - - - - 使用时间 + + 套餐类型:{{goods_detail.spec[type_index].name}} + + + 套餐类型 + + + {{item.name}} + + + + + + 使用时间 + + + + {{go_date}} + + - - - {{go_date}} - + + + 数量 + + - - - 数量 - - + + - - - - - - - - - - - - ¥{{ choose_date_orangilprice*buy_num || goods_detail.spec[type_index].original_price*buy_num}} - - - 套餐类型:{{goods_detail.spec[type_index].name}} - - - 套餐类型 - - - {{item.name}} + + + + + + + + ¥{{ choose_date_orangilprice*buy_num || goods_detail.spec[type_index].original_price*buy_num}} - - - - - 使用时间 + + 套餐类型:{{goods_detail.spec[type_index].name}} + + + 套餐类型 + + + {{item.name}} - - - {{go_date}} - + + + + + 使用时间 + + + + {{go_date}} + + - - - 数量 - - + + 数量 + + + - - - - - - - - - - - - - ¥{{ choose_date_orangilprice*buy_num || goods_detail.spec[type_index].original_price*buy_num}} - - - 套餐类型:{{goods_detail.spec[type_index].name}} - - - 套餐类型 - - - {{item.name}} + + - - - 出行日期 + + + + + + + + ¥{{ choose_date_orangilprice*buy_num || goods_detail.spec[type_index].original_price*buy_num}} + + + 套餐类型:{{goods_detail.spec[type_index].name}} + + + 套餐类型 + + + {{item.name}} + - - - 使用时间 + + + 出行日期 - - - {{go_date}} - + + + 使用时间 + + + + {{go_date}} + + - - - 数量 - - + + 数量 + + + + + + - - - - - + + + @@ -558,6 +568,16 @@ if(this.goods_detail) { this.getShopDistance(); } + if(!this.$isRight(this.goods_detail.spec)){ + uni.showModal({ + title: '', + content: '该商品暂无规格,无法购买', + showCancel: false, + success: result => { + this.$toBack(); + } + }) + } this.is_collect = Boolean(res.data.is_collect) || false; }).catch(err => { this.skeletonLoading = false; @@ -576,7 +596,7 @@ const self_latitude = res.latitude const self_longitude = res.longitude console.log('当前经纬度',self_latitude,self_longitude,res); - if(that.$isRight(that.goods_detail.product.extends)) { + if(that.goods_detail.product && that.$isRight(that.goods_detail.product.extends)) { const shop_latitude = that.goods_detail.product.extends.field_2_latitude; const shop_longitude = that.goods_detail.product.extends.field_2_longitude; console.log('商家经纬度',shop_latitude,shop_longitude); diff --git a/pages/order/confirm_order.vue b/pages/order/confirm_order.vue index 19730d6..a1707fd 100644 --- a/pages/order/confirm_order.vue +++ b/pages/order/confirm_order.vue @@ -14,7 +14,6 @@ --> - {{item.field}} @@ -42,6 +41,11 @@ + + {{ info[item.field] || '请选择日期' }} + + +