Commit 9267aaf93ac412f45dd12dfdccdedf9c4b0027ed

Authored by yvan.ni
1 parent a945267f

阶梯购买的bug优化

1.  商品详情也要显示折数
2.  计算超出阶梯数量的折扣计算问题
components/goods_list/goods_list.wxml
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 <!-- 商品名称 --> 15 <!-- 商品名称 -->
16 <view class="goods_name ellipsis-2 fs28">{{item.goods_name}}</view> 16 <view class="goods_name ellipsis-2 fs28">{{item.goods_name}}</view>
17 <!-- 判断是否有活动价 --> 17 <!-- 判断是否有活动价 -->
18 - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7}}"> 18 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10}}">
19 <view class="pdt10"> 19 <view class="pdt10">
20 <view class="money flex xc-wc" > 20 <view class="money flex xc-wc" >
21 <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text> 21 <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text>
pages/cart/cart2/ladder_calculate.js
@@ -103,14 +103,15 @@ module.exports = { @@ -103,14 +103,15 @@ module.exports = {
103 new_g.prom_type = 0; 103 new_g.prom_type = 0;
104 new_g.prom_id = 0; 104 new_g.prom_id = 0;
105 goods.push(new_g); 105 goods.push(new_g);
106 - goods.splice(idx, 1); 106 + //goods.splice(idx, 1);
107 } 107 }
108 } 108 }
109 109
  110 + //-- 最后剔除不要参与的数据 --
110 for(var h in del_g){ 111 for(var h in del_g){
111 var it=del_g[h]; 112 var it=del_g[h];
112 let idx = goods.findIndex(function (ele) { 113 let idx = goods.findIndex(function (ele) {
113 - return ele.goods_id == it.goods_id; 114 + return ele.goods_id == it.goods_id
114 }) 115 })
115 goods.splice(idx, 1); 116 goods.splice(idx, 1);
116 } 117 }
pages/user/order_detail/order_detail.wxml
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 </navigator> 32 </navigator>
33 33
34 <view class="order-num"> 34 <view class="order-num">
35 - <view class="goods-price">¥{{item.member_goods_price}}</view> 35 + <view class="goods-price">¥{{item.member_goods_price}}<text wx:if="{{item.prom_type==10}}" style="margin-left: 5rpx">({{item.ladder_discount}}折)</text> </view>
36 <view class="goods-num">×{{item.goods_num}}</view> 36 <view class="goods-num">×{{item.goods_num}}</view>
37 37
38 <!-- 不是整单退的时候 --> 38 <!-- 不是整单退的时候 -->
pages/user/order_list/order_list.wxml
@@ -148,7 +148,7 @@ @@ -148,7 +148,7 @@
148 <!-- 幸运购prom_type等于9 --> 148 <!-- 幸运购prom_type等于9 -->
149 <!-- 如果是幸运购就显示幸运购参团价格 --> 149 <!-- 如果是幸运购就显示幸运购参团价格 -->
150 <view class="fs26" wx:if="{{goods.prom_type == 9}}">{{filters.toFix(goods.goods_price,2)}}</view> 150 <view class="fs26" wx:if="{{goods.prom_type == 9}}">{{filters.toFix(goods.goods_price,2)}}</view>
151 - <view class="fs26" wx:else>{{filters.toFix(goods.member_goods_price,2)}}</view> 151 + <view class="fs26" wx:else>{{filters.toFix(goods.member_goods_price,2)}} <text wx:if="{{goods.prom_type==10}}">({{goods.ladder_discount}}折)</text> </view>
152 </view> 152 </view>
153 <view class="fs26 c-a9">x{{goods.goods_num}}</view> 153 <view class="fs26 c-a9">x{{goods.goods_num}}</view>
154 </view> 154 </view>