Browse Source

优惠券

zhengjinyi 3 years ago
parent
commit
8add4caed2

+ 3 - 2
src/main/resources/static/js/shopping/confirm.js

@@ -151,6 +151,7 @@ var shoppingConfirm = new Vue({
                         })
                         _self.couponList[0].ischecked = true;
                         _self.payInfo.orderShouldPayFee = data.totalPrice - _self.couponAmount;
+                        console.log('111111111',_self.payInfo.orderShouldPayFee)
                     }
                     _self.totalDiscountAmount =  _self.reducedPrice + _self.couponAmount;
                     if(data.invoice){
@@ -174,7 +175,7 @@ var shoppingConfirm = new Vue({
                     _self.payInfo.freePostFlag = r.data.freePostFlag;
                     _self.userBeans = r.data.userBeans;
                     _self.payInfo.freight = (r.data.freePostFlag===1 ? r.data.freight : 0);
-                    _self.payInfo.orderShouldPayFee = _self.totalPrice + _self.payInfo.freight;
+                    _self.payInfo.orderShouldPayFee = _self.totalPrice + _self.payInfo.freight - _self.couponAmount;
                     switch (_self.payInfo.freePostFlag) {
                         case 1:
                             if( _self.userBeans > 0 ){
@@ -505,7 +506,7 @@ var shoppingConfirm = new Vue({
         },
         changeDeductibleFreight: function(){//选择采美豆抵扣邮费
             var _self = this;
-            var total = _self.totalPrice + _self.payInfo.freight - - _self.couponAmount;
+            var total = _self.totalPrice + _self.payInfo.freight - _self.couponAmount;
             if(_self.balance.isFreight){//判断是否勾选运费
                 if(_self.payInfo.freePostFlag == 1){//有邮费
                     _self.hanldUserBeans = _self.freightBeansMoney*100;

+ 1 - 1
src/main/resources/templates/product/detail.html

@@ -140,7 +140,7 @@
                             </div>
                         </template>
                     </div>
-                    <div class="row" v-if="productCoupon>0">
+                    <div class="row" v-if="productCoupon.length>0">
                         <span class="l">优惠券</span>
                         <i>:</i>
                         <span class="coupon-tags">