购买界面优化
This commit is contained in:
@@ -257,7 +257,7 @@
|
||||
PayAmount: function () {
|
||||
var count = this.OneBuyModel.Account.split(',').length;
|
||||
var restAmout = this.OneBuyModel.UseAccountAmount == 1 ? this.RestAmount : 0;
|
||||
var total = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount * count - this.OneBuyModel.CouponAmount - restAmout;
|
||||
var total = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount * count - this.OneBuyModel.CouponAmount ;
|
||||
total= total < 0 ? 0 : total;
|
||||
return total.toFixed(2);
|
||||
}
|
||||
@@ -271,6 +271,9 @@
|
||||
if (totalAmount < item.AllowMinAmount) {
|
||||
continue;
|
||||
}
|
||||
if(newValue == '0'){
|
||||
this.OneBuyModel.CouponAmount = 0;
|
||||
}
|
||||
if (item.Id == newValue) {
|
||||
if (item.CouponType == 1) {//满减
|
||||
this.OneBuyModel.CouponAmount = item.CouponValue;
|
||||
@@ -316,9 +319,11 @@
|
||||
})
|
||||
},
|
||||
onePay: function () {
|
||||
if (this.PayAmount > 0 ) {
|
||||
if (this.OneBuyModel.UseAccountAmount){
|
||||
if (this.OneBuyModel.UseAccountAmount) {
|
||||
if (this.RestAmount < this.PayAmount){
|
||||
alert('余额不足,请充值。您也可以使用微信、支付宝支付。');return;
|
||||
} else {
|
||||
this.RestAmount = this.RestAmount - this.PayAmount;
|
||||
}
|
||||
}
|
||||
var that = this;
|
||||
|
||||
Reference in New Issue
Block a user