Commit 80691e18 by 高淑倩

selectCoupon

parent d842823f
...@@ -78,8 +78,17 @@ Component({ ...@@ -78,8 +78,17 @@ Component({
if(coupon.checked) { if(coupon.checked) {
coupon.checked = coupon.checked ? false : true coupon.checked = coupon.checked ? false : true
} else { } else {
coupon.checked = coupon.id == id ? true : false if(coupon.id) {
coupon.checked = coupon.id == id ? true : false
} else if(coupon.couponSettingId) {
coupon.checked = coupon.couponSettingId == sid ? true : false
}
} }
// if(coupon.checked) {
// coupon.checked = coupon.checked ? false : true
// } else {
// coupon.checked = coupon.id == id ? true : false
// }
} ) } )
}) })
......
...@@ -103,14 +103,11 @@ wxService.page({ ...@@ -103,14 +103,11 @@ wxService.page({
} }
const { faceAmount, type, id, couponDiscount,sid } = e.detail const { faceAmount, type, id, couponDiscount,sid } = e.detail
const { defalutCouponId } = this.data const { defalutCouponId } = this.data
console.log('detail=====', e.detail)
const { orderPrice } = this.data const { orderPrice } = this.data
// couponId---id couponSettingId --sid // couponId---id couponSettingId --sid
let finCouponId = id ? id : sid let finCouponId = id ? id : sid
let finCouponName = id ? 'couponId' : 'couponSettingId' let finCouponName = id ? 'couponId' : 'couponSettingId'
console.log('upppppppppppppp', finCouponName,finCouponId ) console.log('sele', finCouponName, finCouponId)
if (type == 1) { if (type == 1) {
this.setData({ this.setData({
defalutCoupon: true, defalutCoupon: true,
...@@ -252,7 +249,6 @@ wxService.page({ ...@@ -252,7 +249,6 @@ wxService.page({
} }
}, },
bindMultiPickerColumnChange(e) { bindMultiPickerColumnChange(e) {
console.log('0000', e)
const detail = e.detail const detail = e.detail
const index = detail.value const index = detail.value
let cityName = '' let cityName = ''
...@@ -427,10 +423,10 @@ wxService.page({ ...@@ -427,10 +423,10 @@ wxService.page({
addressId: addressId ? addressId : addressInfo.id // 微信地址 or 地址id addressId: addressId ? addressId : addressInfo.id // 微信地址 or 地址id
} }
console.log('defalutCoupon',this.data.defalutCoupon) // console.log('defalutCoupon',this.data.defalutCoupon)
console.log('couponIdiiiiiiiiiiiidddddd',couponId) // console.log('couponIdiiiiiiiiiiiidddddd',couponId)
console.log('couponSettingIdiiiiiiidddddd',couponSettingId) // console.log('couponSettingIdiiiiiiidddddd',couponSettingId)
console.log('defalutCouponIdiiiiiiiiiiiiiidddddd',defalutCouponId) // console.log('defalutCouponIdiiiiiiiiiiiiiidddddd',defalutCouponId)
console.log('params', params) console.log('params', params)
this.getBill(params) // 下单 this.getBill(params) // 下单
}, },
......
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