Commit 4bfa39fea90f62a2c174a9a55e83de873dded45f
Merge branch 'test' of http://git.vipzhuang.cn/wxd/MShopWeApp into qa
Showing
5 changed files
with
44 additions
and
39 deletions
components/diy_floatingBox/diy_floatingBox.wxss
| @@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
| 22 | z-index: 100; | 22 | z-index: 100; |
| 23 | background-color: #fff; | 23 | background-color: #fff; |
| 24 | border: 1px solid #adadad; | 24 | border: 1px solid #adadad; |
| 25 | - box-shadow: 0 0 10px 2px #adadad; | 25 | + /* box-shadow: 0 0 10px 2px #adadad; */ |
| 26 | display: flex; | 26 | display: flex; |
| 27 | align-items: center; | 27 | align-items: center; |
| 28 | justify-content: center; | 28 | justify-content: center; |
components/diy_service/diy_service.wxss
| 1 | .custom-service{ width: 80rpx; height: 80rpx; border-radius: 50%; background-color: #fff;z-index: 100; | 1 | .custom-service{ width: 80rpx; height: 80rpx; border-radius: 50%; background-color: #fff;z-index: 100; |
| 2 | - border: 1px solid #adadad; box-shadow: 0 0 10px 2px #adadad; line-height: 28rpx; | 2 | + border: 1px solid #adadad; line-height: 28rpx; |
| 3 | right: 2rpx; display: flex;align-items: center;justify-content: center;} | 3 | right: 2rpx; display: flex;align-items: center;justify-content: center;} |
| 4 | 4 | ||
| 5 | .cs-img{ width: 36rpx; height: 36rpx;} | 5 | .cs-img{ width: 36rpx; height: 36rpx;} |
packageE/pages/cart/cart2/cart2.js
| @@ -1027,39 +1027,43 @@ Page({ | @@ -1027,39 +1027,43 @@ Page({ | ||
| 1027 | //-- 判断组合购是总数量是不是存在 -- | 1027 | //-- 判断组合购是总数量是不是存在 -- |
| 1028 | var no_zh_num={}; | 1028 | var no_zh_num={}; |
| 1029 | //-- 多促销活动调用接口需要的参数,和商品的购买数量和活动的购买数量的请求参数 -- | 1029 | //-- 多促销活动调用接口需要的参数,和商品的购买数量和活动的购买数量的请求参数 -- |
| 1030 | - var dug_cx_arr = []; | ||
| 1031 | - //获取 限购 和 多活动的促销---2024-2-1 | ||
| 1032 | - for (var i = 0; i < carr.length; i++) { | ||
| 1033 | 1030 | ||
| 1034 | - let item1 = carr[i]; | ||
| 1035 | - //如果不是活动的时候,不是代发商品的时候,不是赠品的时候,不是阶梯商品拆分的,不是组合购拆分的 | ||
| 1036 | - if([1, 2, 4, 6, 8, 9].indexOf(item1.prom_type)== -1 && !item1.whsle_id | ||
| 1037 | - && !item1.is_gift && !item1.is_ld_split && !item1.is_zh_split ){ | ||
| 1038 | - //-- 快速查找,组装查询多活动的列表 -- | ||
| 1039 | - let f_idx=dug_cx_arr.findIndex(function (ele) { | ||
| 1040 | - return ele.goods_id == item1.goods_id | ||
| 1041 | - }); | ||
| 1042 | - if(f_idx==-1) { | ||
| 1043 | - let gd_ite={ | ||
| 1044 | - goods_id:carr[i].goods_id, | ||
| 1045 | - goods_num:1, | ||
| 1046 | - is_limit_show:1, | ||
| 1047 | - is_state:0 | 1031 | + if(!is_change){ |
| 1032 | + var dug_cx_arr = []; | ||
| 1033 | + //获取 限购 和 多活动的促销---2024-2-1 | ||
| 1034 | + for (var i = 0; i < carr.length; i++) { | ||
| 1035 | + | ||
| 1036 | + let item1 = carr[i]; | ||
| 1037 | + //如果不是活动的时候,不是代发商品的时候,不是赠品的时候,不是阶梯商品拆分的,不是组合购拆分的 | ||
| 1038 | + if([1, 2, 4, 6, 8, 9].indexOf(item1.prom_type)== -1 && !item1.whsle_id | ||
| 1039 | + && !item1.is_gift && !item1.is_ld_split && !item1.is_zh_split ){ | ||
| 1040 | + //-- 快速查找,组装查询多活动的列表 -- | ||
| 1041 | + let f_idx=dug_cx_arr.findIndex(function (ele) { | ||
| 1042 | + return ele.goods_id == item1.goods_id | ||
| 1043 | + }); | ||
| 1044 | + if(f_idx==-1) { | ||
| 1045 | + let gd_ite={ | ||
| 1046 | + goods_id:carr[i].goods_id, | ||
| 1047 | + goods_num:1, | ||
| 1048 | + is_limit_show:1, | ||
| 1049 | + is_state:0 | ||
| 1050 | + } | ||
| 1051 | + dug_cx_arr.push(gd_ite); | ||
| 1048 | } | 1052 | } |
| 1049 | - dug_cx_arr.push(gd_ite); | 1053 | + |
| 1050 | } | 1054 | } |
| 1051 | 1055 | ||
| 1056 | + if(is_change){ | ||
| 1057 | + carr[i].collocationList=null; | ||
| 1058 | + } | ||
| 1052 | } | 1059 | } |
| 1053 | - | ||
| 1054 | - if(is_change){ | ||
| 1055 | - carr[i].collocationList=null; | 1060 | + //-- 对商品的多促销进行判断 ---2024-2-1-- |
| 1061 | + if(dug_cx_arr.length){ | ||
| 1062 | + await th.buy_pro_group(dug_cx_arr,carr); | ||
| 1056 | } | 1063 | } |
| 1057 | } | 1064 | } |
| 1058 | 1065 | ||
| 1059 | - //-- 对商品的多促销进行判断 ---2024-2-1-- | ||
| 1060 | - if(dug_cx_arr.length){ | ||
| 1061 | - await th.buy_pro_group(dug_cx_arr,carr); | ||
| 1062 | - } | 1066 | + |
| 1063 | //在分组的时候,就不要再调用接口,await | 1067 | //在分组的时候,就不要再调用接口,await |
| 1064 | for (var i = 0; i < carr.length; i++) { | 1068 | for (var i = 0; i < carr.length; i++) { |
| 1065 | var item = carr[i]; | 1069 | var item = carr[i]; |
| @@ -2477,9 +2481,9 @@ Page({ | @@ -2477,9 +2481,9 @@ Page({ | ||
| 2477 | 2481 | ||
| 2478 | ord_goods.splice(pos+1,0,newd); | 2482 | ord_goods.splice(pos+1,0,newd); |
| 2479 | th.data.old_cartlist[i].goods.splice(pos2+1,0,newd); | 2483 | th.data.old_cartlist[i].goods.splice(pos2+1,0,newd); |
| 2480 | - | ||
| 2481 | - var txt9 = "cartlist[" + i + "].goods["+(pos+1)+"]"; | ||
| 2482 | - th.setData({ [txt9]: newd }) | 2484 | + var txt9 = "cartlist[" + i + "].goods"; |
| 2485 | + th.setData({ [txt9]: ord_goods }) | ||
| 2486 | + | ||
| 2483 | 2487 | ||
| 2484 | } | 2488 | } |
| 2485 | 2489 | ||
| @@ -8610,6 +8614,11 @@ Page({ | @@ -8610,6 +8614,11 @@ Page({ | ||
| 8610 | //--- 不参与优惠促销的开关 --- | 8614 | //--- 不参与优惠促销的开关 --- |
| 8611 | no_cj_prom: function (e) { | 8615 | no_cj_prom: function (e) { |
| 8612 | 8616 | ||
| 8617 | + //重新调用cart_next,进行下一步计算 | ||
| 8618 | + wx.showLoading({ | ||
| 8619 | + title: "处理中.", | ||
| 8620 | + }) | ||
| 8621 | + | ||
| 8613 | this.setData({ | 8622 | this.setData({ |
| 8614 | send_lb:{}, | 8623 | send_lb:{}, |
| 8615 | month_lb:{}, | 8624 | month_lb:{}, |
| @@ -8693,10 +8702,7 @@ Page({ | @@ -8693,10 +8702,7 @@ Page({ | ||
| 8693 | th.data.cartlist_y = JSON.parse(JSON.stringify(n_goods)) | 8702 | th.data.cartlist_y = JSON.parse(JSON.stringify(n_goods)) |
| 8694 | 8703 | ||
| 8695 | 8704 | ||
| 8696 | - //重新调用cart_next,进行下一步计算 | ||
| 8697 | - wx.showLoading({ | ||
| 8698 | - title: "处理中.", | ||
| 8699 | - }) | 8705 | + |
| 8700 | this.get_cart_next(null, 1, {prom_type: 0, prom_id: 0}); | 8706 | this.get_cart_next(null, 1, {prom_type: 0, prom_id: 0}); |
| 8701 | 8707 | ||
| 8702 | 8708 |
packageE/pages/cart/cart2/cart2.wxml
| @@ -122,7 +122,7 @@ | @@ -122,7 +122,7 @@ | ||
| 122 | 122 | ||
| 123 | 123 | ||
| 124 | <!-- 多个活动的时候 --> | 124 | <!-- 多个活动的时候 --> |
| 125 | - <block wx:if="{{item.show_can_cx[items.goods_id].act_arr.length>1}}"> | 125 | + <block wx:if="{{item.show_can_cx[items.goods_id].act_arr.length>1 && !items.is_gift}}"> |
| 126 | <!-- 组合购和阶梯促销要特殊出来 --> | 126 | <!-- 组合购和阶梯促销要特殊出来 --> |
| 127 | <block wx:if="{{item.show_can_cx[items.goods_id].sele_prom_type==7 || item.show_can_cx[items.goods_id].sele_prom_type==10 }}"> | 127 | <block wx:if="{{item.show_can_cx[items.goods_id].sele_prom_type==7 || item.show_can_cx[items.goods_id].sele_prom_type==10 }}"> |
| 128 | 128 | ||
| @@ -210,7 +210,7 @@ | @@ -210,7 +210,7 @@ | ||
| 210 | </view> | 210 | </view> |
| 211 | </block> | 211 | </block> |
| 212 | <block wx:else> | 212 | <block wx:else> |
| 213 | - <view class="bdb16" wx:if="{{pitem.is_duo_gd && pitem.act_arr.length>1 && util.check_is_last(index,items.goods_id) }}" > | 213 | + <view class="bdb16" wx:if="{{pitem.is_duo_gd && pitem.act_arr.length>1 && util.check_is_last(index,items.goods_id) && !items.is_gift }}" > |
| 214 | <view bindtap="switch_cx_group" | 214 | <view bindtap="switch_cx_group" |
| 215 | data-index="{{pidx}}" | 215 | data-index="{{pidx}}" |
| 216 | data-gd_key="{{index}}" | 216 | data-gd_key="{{index}}" |
| @@ -563,7 +563,6 @@ | @@ -563,7 +563,6 @@ | ||
| 563 | </view> | 563 | </view> |
| 564 | </block> | 564 | </block> |
| 565 | 565 | ||
| 566 | - | ||
| 567 | <block wx:if="{{collocation_goods}}"> | 566 | <block wx:if="{{collocation_goods}}"> |
| 568 | <!-- 搭配购买的功能实现 --> | 567 | <!-- 搭配购买的功能实现 --> |
| 569 | <view class="order-detail" wx:for="{{collocation_goods}}"> | 568 | <view class="order-detail" wx:for="{{collocation_goods}}"> |
pages/goods/categoryList/categoryList.wxml
| @@ -306,7 +306,7 @@ | @@ -306,7 +306,7 @@ | ||
| 306 | </swiper> | 306 | </swiper> |
| 307 | </view> | 307 | </view> |
| 308 | <view class="my-container"> | 308 | <view class="my-container"> |
| 309 | - <view class="classify_name fs28 flex-space-between ai-center" data-pid="0" data-cid="{{cat_id}}" bindtap="{{(one_level_classify[select_classify_on].diy_class) ? '' :'select_more'}} "> | 309 | + <view class="classify_name fs28 flex-space-between ai-center" data-pid="0" data-cid="{{cat_id}}" bindtap="{{(one_level_classify[select_classify_on].diy_class) ? '' :'select_more'}}"> |
| 310 | <view class="classify_title ellipsis-1">{{classify_name}}</view> | 310 | <view class="classify_title ellipsis-1">{{classify_name}}</view> |
| 311 | <view class="flex select_more ai-center" wx:if="{{!(one_level_classify[select_classify_on].diy_class)}}"> | 311 | <view class="flex select_more ai-center" wx:if="{{!(one_level_classify[select_classify_on].diy_class)}}"> |
| 312 | <view class="red-co fs24">更多</view> | 312 | <view class="red-co fs24">更多</view> |
| @@ -340,7 +340,7 @@ | @@ -340,7 +340,7 @@ | ||
| 340 | <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="inds"> | 340 | <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="inds"> |
| 341 | <view> | 341 | <view> |
| 342 | 342 | ||
| 343 | - <view class="classify_name fs28 flex-space-between ai-center" data-pid="{{goods.items.parent_id}}" data-cid="{{goods.items.id}}" bindtap="{{one_level_classify[select_classify_on][diy_class] ? '' :'select_more'}} "> | 343 | + <view class="classify_name fs28 flex-space-between ai-center" data-pid="{{goods.items.parent_id}}" data-cid="{{goods.items.id}}" bindtap="{{one_level_classify[select_classify_on][diy_class] ? '' :'select_more'}}"> |
| 344 | 344 | ||
| 345 | <view class="classify_title ellipsis-1" style="margin-left: 25rpx;">{{goods.items.name}}</view> | 345 | <view class="classify_title ellipsis-1" style="margin-left: 25rpx;">{{goods.items.name}}</view> |
| 346 | <view class="flex select_more ai-center" wx:if="{{!one_level_classify[select_classify_on].diy_class}}"> | 346 | <view class="flex select_more ai-center" wx:if="{{!one_level_classify[select_classify_on].diy_class}}"> |