|
@@ -186,7 +186,7 @@ Page({ |
|
@@ -186,7 +186,7 @@ Page({ |
|
186
|
})
|
186
|
})
|
|
187
|
console.log('优惠金额----', price);
|
187
|
console.log('优惠金额----', price);
|
|
188
|
let val = this.data.inputValue * 1;
|
188
|
let val = this.data.inputValue * 1;
|
|
189
|
- let actualPrice = val - price.toFixed(2)
|
189
|
+ let actualPrice = (val - price).toFixed(2)
|
|
190
|
price = price.toFixed(2)
|
190
|
price = price.toFixed(2)
|
|
191
|
this.setData({
|
191
|
this.setData({
|
|
192
|
discountPrice: price,
|
192
|
discountPrice: price,
|
|
@@ -239,7 +239,17 @@ Page({ |
|
@@ -239,7 +239,17 @@ Page({ |
|
239
|
paySign: res.data.paySign,
|
239
|
paySign: res.data.paySign,
|
|
240
|
success(ress) {
|
240
|
success(ress) {
|
|
241
|
if (ress.errMsg == 'requestPayment:ok') {
|
241
|
if (ress.errMsg == 'requestPayment:ok') {
|
|
242
|
- // that.writeOff()
|
242
|
+ that.setData({
|
|
|
|
243
|
+ inputValue: '',
|
|
|
|
244
|
+ finalList: [],
|
|
|
|
245
|
+ couponArr: [],
|
|
|
|
246
|
+ discountPrice: '0.00',
|
|
|
|
247
|
+ actualPrice: '',
|
|
|
|
248
|
+ })
|
|
|
|
249
|
+ // 需要延迟获取才能获取到最新的券列表
|
|
|
|
250
|
+ setTimeout(() => {
|
|
|
|
251
|
+ that.getCoupon()
|
|
|
|
252
|
+ }, 8000);
|
|
243
|
console.log('支付成功', ress);
|
253
|
console.log('支付成功', ress);
|
|
244
|
return wx.showToast({
|
254
|
return wx.showToast({
|
|
245
|
title: '支付成功',
|
255
|
title: '支付成功',
|