From 8f9694afe5f3b1633763958a6b1779451ec78482 Mon Sep 17 00:00:00 2001 From: shaojing <2901156235@qq.com> Date: Fri, 9 Aug 2024 11:14:44 +0800 Subject: [PATCH] =?UTF-8?q?vr,=E6=9C=9F=E7=A5=A8=E9=80=89=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E5=88=B8=E5=90=8E=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- pages/info/museumInfo/index.js | 3 ++- pages/order/postOrder/index.js | 2 +- pages/order/scene/index.js | 44 ++++++++++++++++++---------------- 4 files changed, 27 insertions(+), 24 deletions(-) diff --git a/app.js b/app.js index 79152fd..6ec30f8 100644 --- a/app.js +++ b/app.js @@ -21,7 +21,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest139? true : false; + data.isTest = data.isTest140? true : false; this.globalData.configJson = data }).then(() => { // 获取ui配置文件 diff --git a/pages/info/museumInfo/index.js b/pages/info/museumInfo/index.js index a4c3859..8fcbd0e 100644 --- a/pages/info/museumInfo/index.js +++ b/pages/info/museumInfo/index.js @@ -516,8 +516,9 @@ Page({ }, goVr:function(){ app.globalData.weburl = this.data.info.vr_info_url + let url = this.data.info.vr_info_url wx.navigateTo({ - url: '/pages/pbService/web/index', + url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(url), }) }, diff --git a/pages/order/postOrder/index.js b/pages/order/postOrder/index.js index 0dfa8ad..1668344 100644 --- a/pages/order/postOrder/index.js +++ b/pages/order/postOrder/index.js @@ -62,7 +62,7 @@ Page({ price() { let allPrice if (this.data.coupon) { - if (this.data.coupon.discount_type == 'pricebreak') { + if (this.data.coupon.activity.discount_type == 'pricebreak') { return allPrice = this.data.showPrice + this.data.postFee - this.data.coupon.activity.money>0?this.data.showPrice + this.data.postFee - this.data.coupon.activity.money/100:0 } else { return allPrice = (this.data.showPrice* this.data.coupon.activity.fold)/ 10 + this.data.postFee diff --git a/pages/order/scene/index.js b/pages/order/scene/index.js index f5a0ada..66efdf5 100644 --- a/pages/order/scene/index.js +++ b/pages/order/scene/index.js @@ -144,7 +144,8 @@ Page({ // }) let price if (this.data.coupon) { - if (this.data.coupon.discount_type == 'pricebreak') { + console.log(app.globalData.couponInfo,this.data.coupon); + if (this.data.coupon.activity.discount_type == 'pricebreak') { price = this.data.singlePrice * this.data.productNum - this.data.coupon.activity.money } else { price =(this.data.singlePrice * this.data.productNum * this.data.coupon.activity.fold)/ 10 @@ -165,25 +166,26 @@ Page({ // console.log(this.data.singlePrice); } // let price = this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0) - let price - if (this.data.coupon) { - if (this.data.coupon.discount_type == 'pricebreak') { - price = this.data.singlePrice * this.data.productNum - this.data.coupon.activity.money - } else { - price =(this.data.singlePrice * this.data.productNum * this.data.coupon.activity.fold)/ 10 - } - } else { - price = this.data.singlePrice * this.data.productNum - } - if (price >0) { - this.setData({ - price:price/100 - }) - }else { - this.setData({ - price:0 - }) - } + // 多写了一遍 + // let price + // if (this.data.coupon) { + // if (this.data.coupon.discount_type == 'pricebreak') { + // price = this.data.singlePrice * this.data.productNum - this.data.coupon.activity.money + // } else { + // price =(this.data.singlePrice * this.data.productNum * this.data.coupon.activity.fold)/ 10 + // } + // } else { + // price = this.data.singlePrice * this.data.productNum + // } + // if (price >0) { + // this.setData({ + // price:price/100 + // }) + // }else { + // this.setData({ + // price:0 + // }) + // } }, cancel: function () { this.setData({ @@ -284,7 +286,7 @@ Page({ totalPrice(price) { let allPrice if (this.data.coupon) { - if (this.data.coupon.discount_type == 'pricebreak') { + if (this.data.coupon.activity.discount_type == 'pricebreak') { allPrice = this.data.singlePrice * this.data.productNum - this.data.coupon.activity.money } else { allPrice =(this.data.singlePrice * this.data.productNum * this.data.coupon.activity.fold)/ 10