Commit fc8fd8a50a1ce217878cea477bc7d4f3017c53d5
1 parent
b7299f21
多促销的优化
Showing
3 changed files
with
15 additions
and
6 deletions
packageE/pages/cart/cart2/cart2.js
... | ... | @@ -754,9 +754,13 @@ Page({ |
754 | 754 | if(carr.length==1){ |
755 | 755 | var item1=carr[0]; |
756 | 756 | await th.buy_pro_group(item1,1); |
757 | - if(item1.prom_type==0 && item1.more_cx){ | |
758 | - //-- 对活动进行排序 -- | |
759 | - th.cx_prom_group(item1.more_cx); | |
757 | + | |
758 | + if(item1.more_cx){ | |
759 | + //-- 对活动进行排序 -- | |
760 | + th.cx_prom_group(item1.more_cx); | |
761 | + } | |
762 | + | |
763 | + if(item1.prom_type==0){ | |
760 | 764 | item1.prom_type=item1.more_cx[0].prom_type; |
761 | 765 | item1.prom_type=item1.more_cx[0].prom_id; |
762 | 766 | } | ... | ... |
pages/cart/cart/cart.js
... | ... | @@ -2193,6 +2193,8 @@ Page({ |
2193 | 2193 | } |
2194 | 2194 | } |
2195 | 2195 | }); |
2196 | + | |
2197 | + | |
2196 | 2198 | } |
2197 | 2199 | //-- 切换活动的按钮要把他返回 -- |
2198 | 2200 | this.data.change_act=0; |
... | ... | @@ -3049,6 +3051,8 @@ Page({ |
3049 | 3051 | goods_id: i_arr[j].goods_id, |
3050 | 3052 | id: i_arr[j].id, |
3051 | 3053 | goods_price: i_arr[j].goods_price, |
3054 | + prom_id:i_arr[j].prom_id, | |
3055 | + prom_type:i_arr[j].prom_type, | |
3052 | 3056 | }; |
3053 | 3057 | //判断是不是线下取价 |
3054 | 3058 | if (i_arr[j].is_offline) { |
... | ... | @@ -4458,6 +4462,7 @@ Page({ |
4458 | 4462 | |
4459 | 4463 | } |
4460 | 4464 | func(show_can_cx); |
4465 | + return false; | |
4461 | 4466 | } |
4462 | 4467 | |
4463 | 4468 | var th=this; | ... | ... |
pages/cart/cart/cart.wxml
... | ... | @@ -130,7 +130,7 @@ |
130 | 130 | |
131 | 131 | <!-- 验证活动是不是多个,要不要显示切换 --> |
132 | 132 | <!-- 新增促销多活动的排版 --> |
133 | - <view class="bdt16" | |
133 | + <view class="bdb16" | |
134 | 134 | wx:if="{{g_filter.is_more_act(items,item.show_can_cx) && item.show_can_cx[items.goods_id] && item.show_can_cx[items.goods_id].act_arr.length>1}}"> |
135 | 135 | <view bindtap="switch_cx_group" |
136 | 136 | data-index="{{pidx}}" |
... | ... | @@ -158,14 +158,14 @@ |
158 | 158 | <!-- 新增促销多活动的排版 --> |
159 | 159 | <block wx:if="{{item.show_can_cx}}"> |
160 | 160 | <block wx:for="{{item.show_can_cx}}" wx:for-item="pitem"> |
161 | - <view class="bdt16" wx:if="{{pitem.is_duo_gd}}" > | |
161 | + <view class="bdb16" wx:if="{{pitem.is_duo_gd}}" > | |
162 | 162 | <view bindtap="switch_cx_group" |
163 | 163 | data-index="{{pidx}}" |
164 | 164 | data-gd_key="{{index}}" |
165 | 165 | class="cx-frame flex" style="position: relative"> |
166 | 166 | <view class="cx-sizs fs30">促销</view> |
167 | 167 | <view class="flex ai_c f1 pdh20"> |
168 | - <view class="xc-coupon-fram" wx:for="{{item.show_can_cx[items.goods_id].act_arr}}" > | |
168 | + <view class="xc-coupon-fram" wx:for="{{item.show_can_cx[index].act_arr}}" > | |
169 | 169 | <view wx:if="{{item.prom_type==3}}" class="xc-coupon t-c four-level-word">优惠促销</view> |
170 | 170 | <view wx:if="{{item.prom_type==5}}" class="xc-coupon t-c four-level-word">搭配促销</view> |
171 | 171 | <view wx:if="{{item.prom_type==7}}" class="xc-coupon t-c four-level-word">组合购</view> | ... | ... |