...
|
...
|
@@ -68,20 +68,15 @@ Page({ |
|
|
},
|
|
|
|
|
|
showSelectCoupon: function () {
|
|
|
console.log('console.log(this.coupon)')
|
|
|
console.log(this.data)
|
|
|
this.setData({
|
|
|
selectingCoupon: true
|
|
|
});
|
|
|
},
|
|
|
|
|
|
async confirmSelectCoupon({detail}) {
|
|
|
console.log('detail')
|
|
|
|
|
|
let code = detail.code;
|
|
|
let codeType = detail.codeType;
|
|
|
console.log(code)
|
|
|
// let codeType = detail.coupon
|
|
|
let amount = detail.amount || '';
|
|
|
|
|
|
this.setData({
|
...
|
...
|
@@ -95,6 +90,7 @@ Page({ |
|
|
let info;
|
|
|
//如果选择了非运费券,促销不选择
|
|
|
let promotion_id = this.data.promotionTips.promotionIds;
|
|
|
//判断优惠劵的类型
|
|
|
if (codeType !== 110){
|
|
|
promotion_id = '';
|
|
|
}
|
...
|
...
|
@@ -120,13 +116,7 @@ Page({ |
|
|
});
|
|
|
}
|
|
|
|
|
|
console.log('data===');
|
|
|
console.log(this.data)
|
|
|
console.log('params')
|
|
|
console.log(params)
|
|
|
info = await api.orderCompute(params, () => wx.hideLoading());
|
|
|
console.log('info')
|
|
|
console.log(info)
|
|
|
}
|
|
|
} catch(e) {}
|
|
|
|
...
|
...
|
@@ -183,15 +173,7 @@ console.log(this.data) |
|
|
}
|
|
|
}
|
|
|
|
|
|
console.log('data');
|
|
|
console.log(data);
|
|
|
|
|
|
|
|
|
// await api.orderSelectCoupon(this.data.skup, () => wx.hideLoading()).then(data => {
|
|
|
|
|
|
// let coupons = data || [];
|
|
|
// console.log('===coupons====');
|
|
|
// console.log(coupons);
|
|
|
// this.setData(coupons)
|
|
|
// });
|
|
|
let that = this;
|
...
|
...
|
@@ -202,17 +184,11 @@ console.log(this.data) |
|
|
let selected = item.selected;
|
|
|
if (selected === 'Y'){
|
|
|
item.isChosen = true;
|
|
|
// selectCouponCode = item.code;
|
|
|
// that.setData({
|
|
|
// selectCouponCode
|
|
|
// })
|
|
|
data.selectCouponAmount = item.coupon_value_str;
|
|
|
}else {
|
|
|
item.isChosen = false;
|
|
|
}
|
|
|
// coupons.push(item);
|
|
|
});
|
|
|
// data.couponList = coupons;
|
|
|
// data.selectCouponCode = selectCouponCode;
|
|
|
}
|
|
|
|
|
|
if (data.good && data.good.goodImg) {
|
...
|
...
|
|