先下单后付款了积分调整
This commit is contained in:
@@ -237,8 +237,8 @@
|
||||
},
|
||||
methods: {
|
||||
childOnShow() {
|
||||
this.getCalcUsablePoints()
|
||||
if (!this.isShow ) {
|
||||
this.getCalcUsablePoints()
|
||||
return;
|
||||
}
|
||||
// uni.$on('couponItem',this.changeCoupon)
|
||||
@@ -268,11 +268,11 @@
|
||||
// 判断优惠金额不能大于支付金额
|
||||
if ( couponData.discountAmount < currentPayAmount) {
|
||||
|
||||
if ( this.isPointsChecked ) {
|
||||
this.listinfo.payAmount = (this.listinfo.payAmount-(this.calcUsablePointsData.pointsNum/this.calcUsablePointsData.equivalentPoints)).toFixed(2);
|
||||
} else {
|
||||
this.listinfo.payAmount = (Number(this.listinfo.payAmount)+(this.calcUsablePointsData.pointsNum/this.calcUsablePointsData.equivalentPoints)).toFixed(2);
|
||||
}
|
||||
// if ( this.isPointsChecked && this.calcUsablePointsData) {
|
||||
// this.listinfo.payAmount = (this.listinfo.payAmount-(this.calcUsablePointsData.pointsNum/this.calcUsablePointsData.equivalentPoints)).toFixed(2);
|
||||
// } else {
|
||||
// this.listinfo.payAmount = (Number(this.listinfo.payAmount)+(this.calcUsablePointsData.pointsNum/this.calcUsablePointsData.equivalentPoints)).toFixed(2);
|
||||
// }
|
||||
this.listinfo.payAmount = ( currentPayAmount - couponData.discountAmount).toFixed(2)
|
||||
this.favorable[0].value = ('-¥'+couponData.discountAmount)
|
||||
|
||||
@@ -282,10 +282,7 @@
|
||||
discountAmount: couponData.discountAmount,
|
||||
num: couponData.type == 1 ? 1 : couponData.num,
|
||||
})
|
||||
if ( this.isPointsChecked ) {
|
||||
this.isPointsChecked = !this.isPointsChecked
|
||||
this.getCalcUsablePoints()
|
||||
}
|
||||
|
||||
this.$emit("setPayAmount",{
|
||||
payAmount: this.listinfo.payAmount,
|
||||
userCouponInfos: this.userCouponInfos,
|
||||
@@ -351,10 +348,7 @@
|
||||
}
|
||||
|
||||
})
|
||||
if ( this.isPointsChecked) {
|
||||
this.isPointsChecked = !this.isPointsChecked
|
||||
this.getCalcUsablePoints()
|
||||
}
|
||||
|
||||
}
|
||||
this.setPayAmount()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user