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