Commit 927bef9e by 高淑倩

默认优惠券id

parent 9ba9ce1d
......@@ -31,6 +31,7 @@ wxService.page({
plusMemberPrice: 0, // plus 默认价
plusMemberName: '',
defalutCoupon: '',
defalutCouponId: '',
addressId: '', // 收货地址id
},
......@@ -332,6 +333,7 @@ wxService.page({
this.setData({
currentOrderList: data,
defalutCoupon: data && data.couponDiscountPreviews.length && data.couponDiscountPreviews[0].couponDiscount || '',
defalutCouponId: data && data.couponDiscountPreviews.length && data.couponDiscountPreviews[0] && data.couponDiscountPreviews[0].couponDTOS[0] && data.couponDiscountPreviews[0].couponDTOS[0].id || '',
orderInitPrice: data.amount
}, () => {
// 实付款
......@@ -342,13 +344,13 @@ wxService.page({
})
},
handelGobuy() {
const { trolleySku2Buy, couponId, addressId, addressInfo } = this.data
const { trolleySku2Buy, couponId, addressId, addressInfo, defalutCouponId } = this.data
let params = {
couponId,
couponId: couponId? couponId : defalutCouponId,
trolleySku2Buy,
addressId: addressId ? addressId : addressInfo.id // 微信地址 or 地址id
}
console.log('wwwwwwwwwwwwwwwparams', params)
this.getBill(params) // 下单
},
// 下单
......@@ -358,8 +360,6 @@ console.log('wwwwwwwwwwwwwwwparams', params)
})
const { isSelect} = this.data
let url = isSelect ? '/sale/payment/merged/buyer/bill' : '/sale/trade/buyer/bill'
// /trade/buyer/bill
// wxService.post(`/sale/payment/merged/buyer/bill`, params).then(res => {
wxService.post(`${url}`, params).then(res => {
if (res) {
const { result, data } = res.data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment