From d55674a860cc0c0bda15a65055df3deb9b0ec970 Mon Sep 17 00:00:00 2001 From: wanyongkang <937888580@qq.com> Date: Tue, 13 Oct 2020 10:12:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Host/Views.Mobile/Product/buy.cshtml | 2 +- Host/Views/Product/buy.cshtml | 12 +++++------- Host/Views/Product/rebuy.cshtml | 7 +++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Host/Views.Mobile/Product/buy.cshtml b/Host/Views.Mobile/Product/buy.cshtml index 89bf48c..18af9b6 100644 --- a/Host/Views.Mobile/Product/buy.cshtml +++ b/Host/Views.Mobile/Product/buy.cshtml @@ -459,7 +459,7 @@ this.MoreBuyModel.CouponAmount = totalAmount * item.CouponValue * 0.1; } else { alert('非天卡无效'); - this.OneBuyModel.CouponId = '0'; + this.MoreBuyModel.CouponId = '0'; } } return; diff --git a/Host/Views/Product/buy.cshtml b/Host/Views/Product/buy.cshtml index e0faecd..0411a8f 100644 --- a/Host/Views/Product/buy.cshtml +++ b/Host/Views/Product/buy.cshtml @@ -487,9 +487,6 @@ 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; @@ -503,6 +500,8 @@ } } return; + } else { + this.OneBuyModel.CouponAmount = 0; } } }, @@ -516,9 +515,6 @@ if (totalAmount < item.AllowMinAmount) { continue; } - if(newValue == '0'){ - this.OneBuyModel.CouponAmount = 0; - } if (item.Id == newValue) { if (item.CouponType == 1) {//满减 this.MoreBuyModel.CouponAmount = item.CouponValue; @@ -528,10 +524,12 @@ this.MoreBuyModel.CouponAmount = totalAmount * item.CouponValue * 0.1; } else { alert('非天卡无效'); - this.OneBuyModel.CouponId = '0'; + this.MoreBuyModel.CouponId = '0'; } } return; + } else { + this.MoreBuyModel.CouponAmount = 0; } } }, diff --git a/Host/Views/Product/rebuy.cshtml b/Host/Views/Product/rebuy.cshtml index e329c23..d764dac 100644 --- a/Host/Views/Product/rebuy.cshtml +++ b/Host/Views/Product/rebuy.cshtml @@ -271,9 +271,6 @@ 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; @@ -287,8 +284,10 @@ } } return; + } else { + this.OneBuyModel.CouponId = '0'; } - } + } }, immediate: true },