|
|
|
@ -270,7 +270,8 @@ Page({ |
|
|
|
allPrice =(this.data.singlePrice * this.data.productNum * this.data.coupon.activity.fold)/ 10 |
|
|
|
} |
|
|
|
} else { |
|
|
|
allPrice = this.data.singlePrice * this.data.productNum |
|
|
|
// allPrice = this.data.singlePrice * this.data.productNum
|
|
|
|
allPrice = price * this.data.productNum |
|
|
|
} |
|
|
|
|
|
|
|
// allPrice = price * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0)
|
|
|
|
@ -289,9 +290,10 @@ Page({ |
|
|
|
}, |
|
|
|
changeDate: function (e) { |
|
|
|
console.log('打印',e); |
|
|
|
let sku_id = e.detail.sku_id; |
|
|
|
// debugger
|
|
|
|
// this.showAllPrice()
|
|
|
|
this.totalPrice(e.detail.price) |
|
|
|
|
|
|
|
if (e.detail.price != this.data.singlePrice && this.data.coupon) { |
|
|
|
wx.showToast({ |
|
|
|
title: '订单价格发生变化,请重新选择优惠券', |
|
|
|
@ -299,7 +301,7 @@ Page({ |
|
|
|
}) |
|
|
|
this.setData({ |
|
|
|
coupon: null, |
|
|
|
singlePrice:e.detail.price |
|
|
|
// singlePrice:e.detail.price
|
|
|
|
}) |
|
|
|
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && this.data.type!='museum') { |
|
|
|
this.couponCom.setNullCoupon() |
|
|
|
@ -308,8 +310,25 @@ Page({ |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
date: e.detail, |
|
|
|
singlePrice: this.data.gp_id ? this.data.product.sku.event_price : e.detail.price |
|
|
|
}) |
|
|
|
|
|
|
|
// 获取sku信息
|
|
|
|
commonApi._post("product/get_sku_detail_id", { |
|
|
|
sku_id: sku_id |
|
|
|
}).then(res => { |
|
|
|
this.data.product.sku = res.data |
|
|
|
app.globalData.product.sku = res.data |
|
|
|
this.setData({ |
|
|
|
singlePrice: this.data.gp_id ? this.data.product.sku.event_price : e.detail.price, |
|
|
|
product: this.data.product |
|
|
|
}) |
|
|
|
console.log('获取skuId',app.globalData.list,app.globalData.index) |
|
|
|
// this.totalPrice(e.detail.price)
|
|
|
|
this.totalPrice(this.data.singlePrice) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.changePrice()
|
|
|
|
}, |
|
|
|
changeTime: function (e) { |
|
|
|
|