|
|
|
@ -16,7 +16,7 @@ Page({ |
|
|
|
remark: "", |
|
|
|
singlePrice: 0, |
|
|
|
type: null, |
|
|
|
coupon: app.globalData.couponInfo, |
|
|
|
coupon:null, |
|
|
|
isLogin: false, |
|
|
|
kjId: null, |
|
|
|
gp_id: null, |
|
|
|
@ -36,8 +36,6 @@ Page({ |
|
|
|
* 生命周期函数--监听页面加载 |
|
|
|
*/ |
|
|
|
onLoad: function (options) { |
|
|
|
console.log(app.globalData.product); |
|
|
|
console.log(options.isCar); |
|
|
|
this.setData({ |
|
|
|
product: app.globalData.product, |
|
|
|
type: options.type, |
|
|
|
@ -83,13 +81,13 @@ Page({ |
|
|
|
title: '订单价格发生变化,请重新选择优惠券', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) { |
|
|
|
this.couponCom.setNullCoupon() |
|
|
|
} |
|
|
|
app.globalData.couponInfo = null; |
|
|
|
this.setData({ |
|
|
|
coupon: null |
|
|
|
}) |
|
|
|
// if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) {
|
|
|
|
// this.couponCom.setNullCoupon()
|
|
|
|
// }
|
|
|
|
// app.globalData.couponInfo = null;
|
|
|
|
// this.setData({
|
|
|
|
// coupon: null
|
|
|
|
// })
|
|
|
|
} |
|
|
|
let productNum = linkmanList.length == 0 ? 1 : this.data.productNum > linkmanList.length ? this.data.productNum : linkmanList.length; |
|
|
|
if (this.data.gp_id) { |
|
|
|
@ -361,6 +359,12 @@ Page({ |
|
|
|
}) |
|
|
|
this.changePrice() |
|
|
|
}, |
|
|
|
//获取最高优惠券
|
|
|
|
getNewCoupon(e){ |
|
|
|
this.setData({ |
|
|
|
coupon:e.detail |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 生命周期函数--监听页面初次渲染完成 |
|
|
|
@ -385,9 +389,9 @@ Page({ |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
coupon: app.globalData.couponInfo |
|
|
|
}) |
|
|
|
// this.setData({
|
|
|
|
// coupon: app.globalData.couponInfo
|
|
|
|
// })
|
|
|
|
// 获取补贴
|
|
|
|
// if (this.data.product) {
|
|
|
|
// commonApi.user_post("product/getProductAllowancePrice", {
|
|
|
|
|