lilei 8 mesiacov pred
rodič
commit
84a78cf9e6
1 zmenil súbory, kde vykonal 4 pridanie a 4 odobranie
  1. 4 4
      pagesB/cart/index.vue

+ 4 - 4
pagesB/cart/index.vue

@@ -61,10 +61,10 @@
 										¥<text>{{Number(totalAmount).toFixed(2).toString().split('.')[0]}}</text>.{{Number(totalAmount).toFixed(2).toString().split('.')[1]}}
 										¥<text>{{Number(totalAmount).toFixed(2).toString().split('.')[0]}}</text>.{{Number(totalAmount).toFixed(2).toString().split('.')[1]}}
 									</view>
 									</view>
 								</view>
 								</view>
-								<view class="flex align_center">
+								<view class="flex align_center" v-if="totalDiscount||totalCoupon">
 									<view class="cart-footer-left-price-text1">
 									<view class="cart-footer-left-price-text1">
-										<text>优惠:¥{{totalDiscount}}</text>
-										<text>代金券:¥{{totalCoupon}}</text>
+										<text v-if="totalDiscount">优惠:¥{{Number(totalDiscount).toFixed(2)}}</text>
+										<text v-if="totalCoupon">代金券:¥{{Number(totalCoupon).toFixed(2)}}</text>
 									</view>
 									</view>
 								</view>
 								</view>
 							</view>
 							</view>
@@ -601,7 +601,7 @@
 							  }
 							  }
 							  // 折扣
 							  // 折扣
 							  if(item.discountType == 'DISCOUNT'){
 							  if(item.discountType == 'DISCOUNT'){
-								 this.totalDiscount += Number(item.price * (1-item.resultValue)) * item.qty
+								 this.totalDiscount += Number(item.orginPrice*(1-item.resultValue)) * item.qty
 							  }
 							  }
 						}
 						}
 						// 满赠
 						// 满赠