This commit is contained in:
@@ -279,7 +279,8 @@ export default {
|
||||
}, 0)
|
||||
|
||||
// 2. 优惠金额直接使用用户输入的值
|
||||
this.discountAmount = parseFloat(this.discountMoney) || 0
|
||||
const discountMoneyVal = parseFloat(this.discountMoney)
|
||||
this.discountAmount = isNaN(discountMoneyVal) ? 0 : discountMoneyVal
|
||||
|
||||
// 3. 计算实付金额 = 原价 - 优惠金额
|
||||
this.actualAmount = this.totalAmount - this.discountAmount
|
||||
|
||||
Reference in New Issue
Block a user