Commit d67db285 authored by youjie's avatar youjie

修复bug

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