Commit d67db285 authored by youjie's avatar youjie

修复bug

parent 86271ffb
......@@ -539,12 +539,16 @@
closeCouponHandler(e) {
if (e != -1) {
this.useCouponId = e;
this.currentCoupon = this.couponList.find(x => x.id == this.useCouponId)
if (this.currentCoupon.couponsType == 1) {
this.currentCoupon.discountMoney = this.currentCoupon.denomination
} else {
this.currentCoupon.discountMoney = (parseFloat(this.price) * (1 - parseFloat(this.currentCoupon.denomination / 10)))
.toFixed(2)
if(this.useCouponId){
this.currentCoupon = this.couponList.find(x => x.id == this.useCouponId)
if (this.currentCoupon.couponsType == 1) {
this.currentCoupon.discountMoney = this.currentCoupon.denomination
} else {
this.currentCoupon.discountMoney = (parseFloat(this.price) * (1 - parseFloat(this.currentCoupon.denomination / 10)))
.toFixed(2)
}
}else{
this.currentCoupon.discountMoney = 0
}
}
this.showCoupon = false;
......
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