| | |
| | | couponInfo: { |
| | | id: '', |
| | | discount: 0, |
| | | thresholdValue: 0 |
| | | thresholdValue: 0, |
| | | discountMax: 0, |
| | | }, // 优惠券内容 |
| | | checkCoupon: { |
| | | id: null, |
| | | discount: 0, |
| | | thresholdValue: 0 |
| | | thresholdValue: 0, |
| | | discountMax: 0, |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | return parseFloat(num); |
| | | } |
| | | const dis = 1 - parseFloat(this.checkCoupon.discount) |
| | | const dic = Math.floor(this.$utils.accMul(this.money,100) * dis) |
| | | let dic = Math.floor(this.$utils.accMul(this.money,100) * dis) |
| | | if(dic>this.checkCoupon.discountMax){ |
| | | dic = this.checkCoupon.discountMax |
| | | } |
| | | return this.$utils.fenToYuan(dic).toFixed(2); |
| | | }, |
| | | discount() { |
| | |
| | | return parseFloat(num); |
| | | } |
| | | const dis = 1 - parseFloat(this.couponInfo.discount) |
| | | const dic = Math.floor(this.$utils.accMul(this.money,100) * dis) |
| | | let dic = Math.floor(this.$utils.accMul(this.money,100) * dis) |
| | | if(dic>this.couponInfo.discountMax){ |
| | | dic = this.couponInfo.discountMax |
| | | } |
| | | return this.$utils.fenToYuan(dic).toFixed(2); |
| | | }, |
| | | payMoney() { |
| | |
| | | thresholdValue: res.thresholdValue, |
| | | discount: res.discount, |
| | | discountType: res.discountType, |
| | | discountMax: res.discountMax |
| | | } |
| | | } |
| | | } |