Showing
1 changed file
with
11 additions
and
10 deletions
| @@ -68,7 +68,7 @@ Page({ | @@ -68,7 +68,7 @@ Page({ | ||
| 68 | }) | 68 | }) |
| 69 | }, | 69 | }, |
| 70 | // 赠送券 | 70 | // 赠送券 |
| 71 | - giftCouponsFun(priceSum) { | 71 | + giftCouponsFun(priceSum,orderid) { |
| 72 | App.Activity.GetActivityConfig({ | 72 | App.Activity.GetActivityConfig({ |
| 73 | sellerid: this.data.seller.sid, | 73 | sellerid: this.data.seller.sid, |
| 74 | }).then(res => { | 74 | }).then(res => { |
| @@ -87,9 +87,9 @@ Page({ | @@ -87,9 +87,9 @@ Page({ | ||
| 87 | if (fullData.rule == '1') { | 87 | if (fullData.rule == '1') { |
| 88 | const price = parseFloat(fullData.price) | 88 | const price = parseFloat(fullData.price) |
| 89 | const amount = parseInt(priceSum / price) | 89 | const amount = parseInt(priceSum / price) |
| 90 | - if (coupons.length > 0) this.getCouponFun(coupons, '1', amount) | 90 | + if (coupons.length > 0) this.getCouponFun(coupons, '1', amount,orderid) |
| 91 | } else { | 91 | } else { |
| 92 | - if (coupons.length > 0) this.getCouponFun(coupons, '1', 1) | 92 | + if (coupons.length > 0) this.getCouponFun(coupons, '1', 1,orderid) |
| 93 | } | 93 | } |
| 94 | } | 94 | } |
| 95 | } | 95 | } |
| @@ -103,7 +103,7 @@ Page({ | @@ -103,7 +103,7 @@ Page({ | ||
| 103 | let obj = this.findObjectByNum(ladder_data, priceSum) | 103 | let obj = this.findObjectByNum(ladder_data, priceSum) |
| 104 | if (obj && obj.coupons) { | 104 | if (obj && obj.coupons) { |
| 105 | let coupons = obj.coupons ? util.determine(obj.coupons) : ''; | 105 | let coupons = obj.coupons ? util.determine(obj.coupons) : ''; |
| 106 | - this.getCouponFun(coupons, '2', '1') | 106 | + this.getCouponFun(coupons, '2', '1',orderid) |
| 107 | } | 107 | } |
| 108 | } | 108 | } |
| 109 | } | 109 | } |
| @@ -111,8 +111,8 @@ Page({ | @@ -111,8 +111,8 @@ Page({ | ||
| 111 | } | 111 | } |
| 112 | }) | 112 | }) |
| 113 | }, | 113 | }, |
| 114 | - getCouponFun(coupons, type, amount) { | ||
| 115 | - console.log('送的券coupons---', coupons, type, amount); | 114 | + getCouponFun(coupons, type, amount,orderid) { |
| 115 | + console.log('送的券coupons---', coupons, type, amount,orderid); | ||
| 116 | let str = coupons.map(item => item.id).join(','); | 116 | let str = coupons.map(item => item.id).join(','); |
| 117 | App.Activity.GetActivityById({ | 117 | App.Activity.GetActivityById({ |
| 118 | id: str, | 118 | id: str, |
| @@ -156,15 +156,16 @@ Page({ | @@ -156,15 +156,16 @@ Page({ | ||
| 156 | totalPrice, | 156 | totalPrice, |
| 157 | }) | 157 | }) |
| 158 | this.showgiveCouponModal() | 158 | this.showgiveCouponModal() |
| 159 | - this.setcouponFun(ids) | 159 | + this.setcouponFun(ids,orderid) |
| 160 | } | 160 | } |
| 161 | } | 161 | } |
| 162 | }) | 162 | }) |
| 163 | }, | 163 | }, |
| 164 | - setcouponFun(str) { | ||
| 165 | - console.log('领取券方法ids---', str); | 164 | + setcouponFun(str,orderid) { |
| 165 | + console.log('领取券方法ids---', str,orderid); | ||
| 166 | App.Activity.SetActivityAsReserve({ | 166 | App.Activity.SetActivityAsReserve({ |
| 167 | aid: str, | 167 | aid: str, |
| 168 | + orderid, | ||
| 168 | }).then((json) => { | 169 | }).then((json) => { |
| 169 | if (json.ret != 200) { | 170 | if (json.ret != 200) { |
| 170 | wx.showToast({ | 171 | wx.showToast({ |
| @@ -396,7 +397,7 @@ Page({ | @@ -396,7 +397,7 @@ Page({ | ||
| 396 | paySign: res.data.paySign, | 397 | paySign: res.data.paySign, |
| 397 | success(ress) { | 398 | success(ress) { |
| 398 | if (ress.errMsg == 'requestPayment:ok') { | 399 | if (ress.errMsg == 'requestPayment:ok') { |
| 399 | - that.giftCouponsFun(actualPrice) //送券 | 400 | + that.giftCouponsFun(actualPrice,res.data.orderid) //送券 |
| 400 | that.setData({ | 401 | that.setData({ |
| 401 | inputValue: '', | 402 | inputValue: '', |
| 402 | finalList: [], | 403 | finalList: [], |
-
Please register or login to post a comment