1
0
Переглянути джерело

修改优惠卷展示问题

lhs 5 роки тому
батько
коміт
fcfeda3851

+ 1 - 0
kmall-api/src/main/java/com/kmall/api/service/ApiCartService.java

@@ -778,6 +778,7 @@ public class ApiCartService {
             if (null != couponList && couponList.size() > 0) {
                 if (isLoadStatus == 0) {
                     checkedCoupon = couponList.get(0);
+                    actualPrice = mathActualPrice(checkedCoupon, actualPrice, checkedGoodsList);
                     couponMap.put("actualPrice", actualPrice);
                     couponMap.put("checkedCoupon", checkedCoupon);
                 }else if(isLoadStatus == 1) {

+ 8 - 8
wx-mall/pages/shopping/checkout/checkout.wxml

@@ -98,7 +98,7 @@
           </view>
           <view class="list-cell-checked-ft router">
             <text wx:if="{{campMinusDto00.campMinusId!=0}}" class="money red-txt">{{campMinusDto00.campMinusType==10 || campMinusDto00.campMinusType==11?'¥'+campMinusDto00.money+'折':'-¥'+campMinusDto00.money}}</text>
-            <text wx:if="{{campMinusDto00.campMinusId==0}}" class="txt">{{campList00.length}}张</text>
+            <text wx:if="{{campMinusDto00.campMinusId==0}}" class="txt">{{campList00.length>1?campList00.length-1:campList00.length}}张</text>
           </view>
         </view>
 
@@ -109,7 +109,7 @@
           </view>
           <view class="list-cell-checked-ft router">
             <text wx:if="{{checkedCoupon00.id > 0}}" class="money red-txt">{{checkedCoupon00.tickDiscType==01?'¥'+checkedCoupon00.typeMoney+'折':'-¥'+checkedCoupon00.typeMoney}}</text>
-            <text wx:if="{{checkedCoupon00.id==0}}" class="txt">{{couponList00.length}}张</text>
+            <text wx:if="{{checkedCoupon00.id==0}}" class="txt">{{couponList00.length>1?couponList00.length-1:couponList00.length}}张</text>
           </view>
         </view>
         <view class="list-cell" bindtap="hideSwitchTicketPop">
@@ -197,7 +197,7 @@
           </view>
           <view class="list-cell-checked-ft router">
             <text wx:if="{{campMinusDto02.campMinusId!=0}}" class="money red-txt">{{campMinusDto02.campMinusType==10 || campMinusDto02.campMinusType==11?'¥'+campMinusDto02.money+'折':'-¥'+campMinusDto02.money}}</text>
-            <text wx:if="{{campMinusDto02.campMinusId==0}}" class="txt">{{campList02.length}}张</text>
+            <text wx:if="{{campMinusDto02.campMinusId==0}}" class="txt">{{campList02.length>1?campList02.length-1:campList02.length}}张</text>
           </view>
         </view>
 
@@ -208,7 +208,7 @@
           </view>
           <view class="list-cell-checked-ft router">
             <text wx:if="{{checkedCoupon02.id > 0}}" class="money red-txt">{{checkedCoupon02.tickDiscType==01?'¥'+checkedCoupon02.typeMoney+'折':'-¥'+checkedCoupon02.typeMoney}}</text>
-            <text wx:if="{{checkedCoupon02.id==0}}" class="txt">{{couponList02.length}}张</text>
+            <text wx:if="{{checkedCoupon02.id==0}}" class="txt">{{couponList02.length>1?couponList02.length-1:couponList02.length}}张</text>
           </view>
         </view>
         <view class="list-cell" bindtap="hideSwitchTicketPop">
@@ -296,7 +296,7 @@
           </view>
           <view class="list-cell-checked-ft router">
             <text wx:if="{{campMinusDto10.campMinusId!=0}}" class="money red-txt">{{campMinusDto10.campMinusType==10 || campMinusDto10.campMinusType==11?'¥'+campMinusDto10.money+'折':'-¥'+campMinusDto10.money}}</text>
-            <text wx:if="{{campMinusDto10.campMinusId==0}}" class="txt">{{campList10.length}}张</text>
+            <text wx:if="{{campMinusDto10.campMinusId==0}}" class="txt">{{campList10.length>1?campList10.length-1:campList10.length}}张</text>
           </view>
         </view>
 
@@ -307,7 +307,7 @@
           </view>
           <view class="list-cell-checked-ft router">
             <text wx:if="{{checkedCoupon10.id > 0}}" class="money red-txt">{{checkedCoupon10.tickDiscType==01?'¥'+checkedCoupon10.typeMoney+'折':'-¥'+checkedCoupon10.typeMoney}}</text>
-            <text wx:if="{{checkedCoupon10.id==0}}" class="txt">{{couponList10.length}}张</text>
+            <text wx:if="{{checkedCoupon10.id==0}}" class="txt">{{couponList10.length>1?couponList10.length-1:couponList10.length}}张</text>
           </view>
         </view>
         <view class="list-cell" bindtap="hideSwitchTicketPop">
@@ -395,7 +395,7 @@
           </view>
           <view class="list-cell-checked-ft router">
             <text wx:if="{{campMinusDto11.campMinusId!=0}}" class="money red-txt">{{campMinusDto11.campMinusType==10 || campMinusDto11.campMinusType==11?'¥'+campMinusDto11.money+'折':'-¥'+campMinusDto11.money}}</text>
-            <text wx:if="{{campMinusDto11.campMinusId==0}}" class="txt">{{campList11.length}}张</text>
+            <text wx:if="{{campMinusDto11.campMinusId==0}}" class="txt">{{campList11.length>1?campList11.length-1:campList11.length}}张</text>
           </view>
         </view>
 
@@ -406,7 +406,7 @@
           </view>
           <view class="list-cell-checked-ft router">
             <text wx:if="{{checkedCoupon11.id > 0}}" class="money red-txt">{{checkedCoupon11.tickDiscType==01?'¥'+checkedCoupon11.typeMoney+'折':'-¥'+checkedCoupon11.typeMoney}}</text>
-            <text wx:if="{{checkedCoupon11.id==0}}" class="txt">{{couponList11.length}}张</text>
+            <text wx:if="{{checkedCoupon11.id==0}}" class="txt">{{couponList11.length>1?couponList11.length-1:couponList11.length}}张</text>
           </view>
         </view>
         <view class="list-cell" bindtap="hideSwitchTicketPop">