Commit 8ddf27423db9b6468b356830170a292bce6f45c2

Authored by WXD-SEASON\season
2 parents ca14fac9 78393c14

Merge branch 'test' of http://git.vipzhuang.cn/wxd/MShopWeApp into qa

components/com_top_nav/com_top_nav.js
@@ -9,6 +9,9 @@ Component({ @@ -9,6 +9,9 @@ Component({
9 }, 9 },
10 color:{ 10 color:{
11 type: String,value: '#313131' 11 type: String,value: '#313131'
  12 + },
  13 + need_cover:{
  14 + type: Number,value: 0
12 } 15 }
13 }, 16 },
14 data: { 17 data: {
components/com_top_nav/com_top_nav.wxml
1 -<cover-view class="t_nav" style="height:{{height}}px;background-color:{{bcolor}};color:{{color}}">  
2 - <cover-view class="tab" style="height:{{h1}}px;">  
3 - <cover-view wx:if="{{user_no}}" class="tb_con" >ID:{{user_no}}<cover-view style="width:20rpx"></cover-view></cover-view>  
4 - <cover-view wx:else class="tb_con" ></cover-view>  
5 - </cover-view>  
6 - <cover-view bindtap="go_back" class="contant" style="height:{{h2}}px">  
7 - <cover-view class="gback">  
8 - <cover-view class="rote_view" style="border: 3rpx solid {{color}};"></cover-view>  
9 - </cover-view>  
10 - <cover-view class="ellip">{{title}}</cover-view>  
11 - </cover-view> 1 +<!-- 需要cover-view是大转盘才会 -->
  2 +<block wx:if="{{need_cover}}">
  3 + <cover-view class="t_nav" style="height:{{height}}px;background-color:{{bcolor}};color:{{color}}">
  4 + <cover-view class="tab" style="height:{{h1}}px;">
  5 + <cover-view wx:if="{{user_no}}" class="tb_con" >ID:{{user_no}}<cover-view style="width:20rpx"></cover-view></cover-view>
  6 + <cover-view wx:else class="tb_con" ></cover-view>
  7 + </cover-view>
  8 + <cover-view bindtap="go_back" class="contant" style="height:{{h2}}px">
  9 + <cover-view class="gback">
  10 + <cover-view class="rote_view" style="border: 3rpx solid {{color}};"></cover-view>
  11 + </cover-view>
  12 + <cover-view class="ellip">{{title}}</cover-view>
  13 + </cover-view>
  14 +
  15 + </cover-view>
  16 +</block>
  17 +<block wx:else>
  18 + <view class="t_nav" style="height:{{height}}px;background-color:{{bcolor}};color:{{color}}">
  19 + <view class="tab" style="height:{{h1}}px;">
  20 + <view wx:if="{{user_no}}" class="tb_con" >ID:{{user_no}}<view style="width:20rpx"></view></view>
  21 + <view wx:else class="tb_con" ></view>
  22 + </view>
  23 + <view bindtap="go_back" class="contant" style="height:{{h2}}px">
  24 + <view class="gback">
  25 + <view class="rote_view" style="border: 3rpx solid {{color}};"></view>
  26 + </view>
  27 + <view class="ellip">{{title}}</view>
  28 + </view>
  29 + </view>
  30 +</block>
  31 +
12 32
13 -</cover-view>  
14 <!-- 用于顶开层的高 --> 33 <!-- 用于顶开层的高 -->
15 -<cover-view style="height:{{height}}px"></cover-view>  
16 \ No newline at end of file 34 \ No newline at end of file
  35 +<view style="height:{{height}}px"></view>
17 \ No newline at end of file 36 \ No newline at end of file
packageB/pages/luckactivity/luckinfo/luckinfo.wxml
1 <wxs module="filter" src="../../../../utils/filter.wxs"></wxs> 1 <wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
2 <wxs module="tool" src="./tool.wxs"></wxs> 2 <wxs module="tool" src="./tool.wxs"></wxs>
3 3
4 -<com_top_nav title="{{l_title}}"></com_top_nav> 4 +<com_top_nav title="{{l_title}}" need_cover="1"></com_top_nav>
5 5
6 <view class="luck-container {{!template&&custom ? 'on':''}}" style="{{luckStyle}}"> 6 <view class="luck-container {{!template&&custom ? 'on':''}}" style="{{luckStyle}}">
7 <!-- <view class="luck-container {{!template&&custom ? 'on':''}}" style="background: {{template&&template.colorCode ? template.colorCode:(custom ? '#f0f0f0':'#da104b')}} url({{bannerUrl ? bannerUrl:''}}) no-repeat;"> --> 7 <!-- <view class="luck-container {{!template&&custom ? 'on':''}}" style="background: {{template&&template.colorCode ? template.colorCode:(custom ? '#f0f0f0':'#da104b')}} url({{bannerUrl ? bannerUrl:''}}) no-repeat;"> -->
packageD/pages/user/member/bring/bring.wxss
@@ -239,7 +239,15 @@ margin-top:28rpx; @@ -239,7 +239,15 @@ margin-top:28rpx;
239 margin-left: 60rpx; 239 margin-left: 60rpx;
240 border-bottom: 1px solid #EEEEEE; 240 border-bottom: 1px solid #EEEEEE;
241 } 241 }
242 - 242 + .one-lists1{
  243 + display: flex;
  244 + font-size: 25rpx;
  245 + width: 680rpx;
  246 + height: 90rpx;
  247 + color: #000000;
  248 + line-height: 90rpx;
  249 + margin-left: 60rpx;
  250 +}
243 /* 输入框样式 */ 251 /* 输入框样式 */
244 .srk-two{ 252 .srk-two{
245 width: 200px; 253 width: 200px;
packageE/pages/cart/cart2/cart2.js
@@ -891,6 +891,8 @@ Page({ @@ -891,6 +891,8 @@ Page({
891 //-- is_change是有没有切换活动的意思 -- 891 //-- is_change是有没有切换活动的意思 --
892 async get_cart_next(carr,is_change,old_prom){ 892 async get_cart_next(carr,is_change,old_prom){
893 893
  894 + this.setData({yh_is_xz_yh:{}});
  895 +
894 //--- 切换的时候一定要把赠品去掉 --- 896 //--- 切换的时候一定要把赠品去掉 ---
895 if(is_change){ 897 if(is_change){
896 898
@@ -934,11 +936,11 @@ Page({ @@ -934,11 +936,11 @@ Page({
934 } 936 }
935 } 937 }
936 } 938 }
937 -  
938 } 939 }
  940 +
939 //按门店分类的数组 941 //按门店分类的数组
940 var arr = new Array(); 942 var arr = new Array();
941 - 943 +
942 var th=this; 944 var th=this;
943 th.data.in_zhact_gdmap = {}; 945 th.data.in_zhact_gdmap = {};
944 //---是不是购买等级卡成功的返回---等级卡显示的判断--- 946 //---是不是购买等级卡成功的返回---等级卡显示的判断---
@@ -6811,7 +6813,19 @@ Page({ @@ -6811,7 +6813,19 @@ Page({
6811 if (fid > -1) return false; 6813 if (fid > -1) return false;
6812 } 6814 }
6813 6815
6814 - ob.price += item.goods_price * item.goods_num; 6816 + //优惠促销取价的优化
  6817 + let f_price=item.goods_price;
  6818 + if(ob.discount_field!=undefined){
  6819 + switch (ob.discount_field){
  6820 + case 0: f_price=item.goods_price;break;
  6821 + case 1: f_price=item.shop_price;break;
  6822 + case 2: f_price=item.goods_market_price;break;
  6823 + }
  6824 + }
  6825 +
  6826 + item.goods_price=f_price;
  6827 +
  6828 + ob.price += f_price * item.goods_num;
6815 ob.goods_num += item.goods_num; 6829 ob.goods_num += item.goods_num;
6816 ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num }); 6830 ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num });
6817 6831
@@ -6851,13 +6865,27 @@ Page({ @@ -6851,13 +6865,27 @@ Page({
6851 var ob = {}; 6865 var ob = {};
6852 ob.prom_id = item.prom_id; 6866 ob.prom_id = item.prom_id;
6853 ob.name = prom.name; 6867 ob.name = prom.name;
6854 - ob.price = item.goods_price * item.goods_num; 6868 +
  6869 + //优惠促销取价的优化
  6870 + let f_price=item.goods_price;
  6871 + if(prom.discount_field!=undefined){
  6872 + switch (prom.discount_field){
  6873 + case 0: f_price=item.goods_price;break;
  6874 + case 1: f_price=item.shop_price;break;
  6875 + case 2: f_price=item.goods_market_price;break;
  6876 + }
  6877 + }
  6878 +
  6879 + item.goods_price=f_price;
  6880 +
  6881 + ob.price = f_price * item.goods_num;
6855 ob.goods_num = item.goods_num; 6882 ob.goods_num = item.goods_num;
6856 ob.is_bz = prom.is_bz; 6883 ob.is_bz = prom.is_bz;
6857 ob.is_xz_yh = prom.is_xz_yh; 6884 ob.is_xz_yh = prom.is_xz_yh;
6858 ob.is_xz_yh = prom.is_xz_yh; 6885 ob.is_xz_yh = prom.is_xz_yh;
6859 ob.is_order_yh = prom.is_order_yh; 6886 ob.is_order_yh = prom.is_order_yh;
6860 ob.is_post_temp = prom.is_post_temp; 6887 ob.is_post_temp = prom.is_post_temp;
  6888 + ob.discount_field = prom.discount_field;
6861 ob.goods = new Array(); 6889 ob.goods = new Array();
6862 ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num }); 6890 ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num });
6863 map[pickid][item.prom_id] = ob; 6891 map[pickid][item.prom_id] = ob;
@@ -6897,14 +6925,29 @@ Page({ @@ -6897,14 +6925,29 @@ Page({
6897 } 6925 }
6898 }) 6926 })
6899 6927
  6928 +
  6929 + //优惠促销取价的优化
  6930 + let f_price=item.goods_price;
  6931 +
  6932 + if(prom.discount_field!=undefined){
  6933 + switch (prom.discount_field){
  6934 + case 0: f_price=item.goods_price;break;
  6935 + case 1: f_price=item.shop_price;break;
  6936 + case 2: f_price=item.goods_market_price;break;
  6937 + }
  6938 + }
  6939 +
  6940 + item.goods_price=f_price;
  6941 +
6900 ob.prom_id = item.prom_id; 6942 ob.prom_id = item.prom_id;
6901 ob.name = prom.name; 6943 ob.name = prom.name;
6902 - ob.price = item.goods_price * item.goods_num; 6944 + ob.price = f_price * item.goods_num;
6903 ob.goods_num = item.goods_num; 6945 ob.goods_num = item.goods_num;
6904 ob.is_bz = prom.is_bz; 6946 ob.is_bz = prom.is_bz;
6905 ob.is_xz_yh = prom.is_xz_yh; 6947 ob.is_xz_yh = prom.is_xz_yh;
6906 ob.is_order_yh = prom.is_order_yh; 6948 ob.is_order_yh = prom.is_order_yh;
6907 ob.is_post_temp = prom.is_post_temp; 6949 ob.is_post_temp = prom.is_post_temp;
  6950 + ob.discount_field = prom.discount_field;
6908 ob.goods = new Array(); 6951 ob.goods = new Array();
6909 ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num }); 6952 ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num });
6910 var obj = {}; 6953 var obj = {};
@@ -8298,6 +8341,76 @@ Page({ @@ -8298,6 +8341,76 @@ Page({
8298 } 8341 }
8299 } 8342 }
8300 func({'code': 0, 'msg': '成功'}) 8343 func({'code': 0, 'msg': '成功'})
  8344 + },
  8345 +
  8346 + //--- 不参与优惠促销的开关 ---
  8347 + no_cj_prom: function (e) {
  8348 +
  8349 +
  8350 + //清空优惠促销的内容
  8351 + this.data.prom_goods_map = {};
  8352 +
  8353 + let th=this;
  8354 + let can_cx_idx = e.currentTarget.dataset.can_cx_idx; //多促销的索引
  8355 + let pidx = e.currentTarget.dataset.pidx; //订单索引
  8356 + let item = this.data.cartlist[pidx].show_can_cx[can_cx_idx]; //促销内容
  8357 + let pk=this.data.cartlist[pidx].pickup_id; //门店ID
  8358 +
  8359 + //给no_cj_prom进行赋值
  8360 + item.no_cj_prom = !item.no_cj_prom ? 1 : 0;
  8361 + var txt = 'cartlist[' + pidx + '].show_can_cx';
  8362 + this.setData({
  8363 + [txt]: this.data.cartlist[pidx].show_can_cx,
  8364 + })
  8365 +
  8366 + let ck_prom_type=item.cur_act;
  8367 + //处理一下商品
  8368 + let goods0 = JSON.parse(JSON.stringify(th.data.cartlist_y));
  8369 + let goods = [];
  8370 + for (var ik = 0; ik < goods0.length; ik++) {
  8371 + var item_c = goods0[ik];
  8372 + if (item_c.pick_id == pk && item_c.is_collocation) continue;
  8373 + goods.push(item_c);
  8374 + }
  8375 +
  8376 + //-- 此时要把购物车中的商品确定活动 --
  8377 + for (var b = 0; b < ck_prom_type.goods.length; b++) {
  8378 + //-- 开始查找 --
  8379 + var fg = goods.findIndex(function (g_item) {
  8380 + return g_item.goods_id == ck_prom_type.goods[b].goods_id
  8381 + && [0, 3, 5, 7, 10].indexOf(g_item.prom_type) > -1
  8382 + && g_item.pick_id == pk && g_item.is_gift == 0;
  8383 + })
  8384 + if (fg > -1) {
  8385 + goods[fg].prom_type = ck_prom_type.prom_type;
  8386 + goods[fg].prom_id = ck_prom_type.prom_id;
  8387 +
  8388 + //如果是不参与的话,商品的活动状态要清理
  8389 + if(item.no_cj_prom){
  8390 + goods[fg].prom_type=0;
  8391 + goods[fg].prom_id=0;
  8392 + }
  8393 +
  8394 + for (var ik = 0; ik < th.data.cartlist[pidx].goods.length; ik++) {
  8395 + if (th.data.cartlist[pidx].goods[ik].id == goods[fg].id) {
  8396 + th.data.cartlist[pidx].goods[ik].prom_type = goods[fg].prom_type;
  8397 + th.data.cartlist[pidx].goods[ik].prom_id = goods[fg].prom_id;
  8398 + }
  8399 + }
  8400 + }
  8401 + }
  8402 +
  8403 + //原始数据要有深拷贝不能有地址的牵连
  8404 + th.data.cartlist_y = JSON.parse(JSON.stringify(goods))
  8405 +
  8406 +
  8407 + //重新调用cart_next,进行下一步计算
  8408 + wx.showLoading({
  8409 + title: "处理中.",
  8410 + })
  8411 + this.get_cart_next(null, 1, {prom_type: 0, prom_id: 0});
  8412 +
  8413 +
8301 } 8414 }
8302 8415
8303 8416
packageE/pages/cart/cart2/cart2.wxml
@@ -118,57 +118,65 @@ @@ -118,57 +118,65 @@
118 118
119 <!-- 验证活动是不是多个,要不要显示切换 --> 119 <!-- 验证活动是不是多个,要不要显示切换 -->
120 <!-- 新增促销多活动的排版,单商品的时候 --> 120 <!-- 新增促销多活动的排版,单商品的时候 -->
121 - <block wx:if="{{(util.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)}}">  
122 -  
123 -  
124 - <!-- 组合购和阶梯促销要特殊出来 -->  
125 - <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 }}">  
126 -  
127 - <!-- 是不是活动的最后一个商品 -->  
128 - <view class="bdb16" wx:if="{{items.is_act_last}}" >  
129 - <view bindtap="switch_cx_group"  
130 - data-index="{{pidx}}"  
131 - data-gd_key="{{items.goods_id}}"  
132 - class="cx-frame flex" style="position: relative">  
133 - <view class="cx-sizs fs30">促销</view>  
134 - <view class="flex ai_c f1 pdh20">  
135 - <view class="xc-coupon-fram" wx:for="{{item.show_can_cx[items.goods_id].act_arr}}" >  
136 - <view wx:if="{{item.prom_type==3}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">优惠促销</view>  
137 - <view wx:if="{{item.prom_type==5}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">搭配促销</view>  
138 - <view wx:if="{{item.prom_type==7}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">组合购</view>  
139 - <view wx:if="{{item.prom_type==10}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">阶梯促销</view> 121 + <block wx:if="{{(util.is_more_act(items,item.show_can_cx) && item.show_can_cx[items.goods_id])}}">
  122 +
  123 +
  124 + <!-- 多个活动的时候 -->
  125 + <block wx:if="{{item.show_can_cx[items.goods_id].act_arr.length>1}}">
  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 }}">
  128 +
  129 + <!-- 是不是活动的最后一个商品 -->
  130 + <view class="bdb16" wx:if="{{items.is_act_last}}" >
  131 + <view bindtap="switch_cx_group"
  132 + data-index="{{pidx}}"
  133 + data-gd_key="{{items.goods_id}}"
  134 + class="cx-frame flex" style="position: relative">
  135 + <view class="cx-sizs fs30">促销</view>
  136 + <view class="flex ai_c f1 pdh20">
  137 + <view class="xc-coupon-fram" wx:for="{{item.show_can_cx[items.goods_id].act_arr}}" >
  138 + <view wx:if="{{item.prom_type==3}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">优惠促销</view>
  139 + <view wx:if="{{item.prom_type==5}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">搭配促销</view>
  140 + <view wx:if="{{item.prom_type==7}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">组合购</view>
  141 + <view wx:if="{{item.prom_type==10}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">阶梯促销</view>
  142 + </view>
  143 + </view>
  144 + <view class="cx-obtain-coupon wsize">
  145 + <text class="bg_jj"></text>
  146 + </view>
140 </view> 147 </view>
141 </view> 148 </view>
142 - <view class="cx-obtain-coupon wsize">  
143 - <text class="bg_jj"></text>  
144 - </view>  
145 - </view>  
146 - </view>  
147 149
148 - </block>  
149 - <block wx:else>  
150 - <view class="bdb16">  
151 - <view bindtap="switch_cx_group"  
152 - data-index="{{pidx}}"  
153 - data-gd_key="{{items.goods_id}}"  
154 - class="cx-frame flex" style="position: relative">  
155 - <view class="cx-sizs fs30">促销</view>  
156 - <view class="flex ai_c f1 pdh20">  
157 - <view class="xc-coupon-fram" wx:for="{{item.show_can_cx[items.goods_id].act_arr}}" >  
158 - <view wx:if="{{item.prom_type==3}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">优惠促销</view>  
159 - <view wx:if="{{item.prom_type==5}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">搭配促销</view>  
160 - <view wx:if="{{item.prom_type==7}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">组合购</view>  
161 - <view wx:if="{{item.prom_type==10}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">阶梯促销</view> 150 + </block>
  151 + <block wx:else>
  152 + <view class="bdb16">
  153 + <view bindtap="switch_cx_group"
  154 + data-index="{{pidx}}"
  155 + data-gd_key="{{items.goods_id}}"
  156 + class="cx-frame flex" style="position: relative">
  157 + <view class="cx-sizs fs30">促销</view>
  158 + <view class="flex ai_c f1 pdh20">
  159 + <view class="xc-coupon-fram" wx:for="{{item.show_can_cx[items.goods_id].act_arr}}" >
  160 + <view wx:if="{{item.prom_type==3}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">优惠促销</view>
  161 + <view wx:if="{{item.prom_type==5}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">搭配促销</view>
  162 + <view wx:if="{{item.prom_type==7}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">组合购</view>
  163 + <view wx:if="{{item.prom_type==10}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">阶梯促销</view>
  164 + </view>
  165 + </view>
  166 + <view class="cx-obtain-coupon wsize">
  167 + <text class="bg_jj"></text>
  168 + </view>
162 </view> 169 </view>
163 </view> 170 </view>
164 - <view class="cx-obtain-coupon wsize">  
165 - <text class="bg_jj"></text>  
166 - </view>  
167 - </view>  
168 - </view> 171 + </block>
169 </block> 172 </block>
170 173
171 - 174 + <view class="set-mes" wx:if="{{items.prom_type==3 || (items.prom_type==0 && item.show_can_cx[items.goods_id].no_cj_prom) }}">
  175 + <view class="use-item" data-pidx="{{pidx}}" data-can_cx_idx="{{items.goods_id}}" bindtap='no_cj_prom'>
  176 + <icon color="{{!item.show_can_cx[items.goods_id].no_cj_prom?'red':'gray'}}" size="16" type="success"></icon>
  177 + <view class="yu_er">参与优惠活动</view>
  178 + </view>
  179 + </view>
172 180
173 </block> 181 </block>
174 182
@@ -177,54 +185,61 @@ @@ -177,54 +185,61 @@
177 <block wx:if="{{item.show_can_cx}}"> 185 <block wx:if="{{item.show_can_cx}}">
178 <block wx:for="{{item.show_can_cx}}" wx:for-item="pitem"> 186 <block wx:for="{{item.show_can_cx}}" wx:for-item="pitem">
179 187
180 - <!-- 组合购和阶梯促销要特殊出来 -->  
181 - <block wx:if="{{ pitem.sele_prom_type==7 || pitem.sele_prom_type==10 }}">  
182 - <!-- 是不是活动的最后一个商品 -->  
183 - <view class="bdb16" wx:if="{{pitem.is_duo_gd && pitem.act_arr.length>1 && items.is_act_last}}" >  
184 -  
185 - <view bindtap="switch_cx_group"  
186 - data-index="{{pidx}}"  
187 - data-gd_key="{{index}}"  
188 - class="cx-frame flex" style="position: relative">  
189 - <view class="cx-sizs fs30">促销</view>  
190 - <view class="flex ai_c f1 pdh20">  
191 - <view class="xc-coupon-fram" wx:for="{{pitem.act_arr}}" >  
192 - <view wx:if="{{item.prom_type==3}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">优惠促销</view>  
193 - <view wx:if="{{item.prom_type==5}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">搭配促销</view>  
194 - <view wx:if="{{item.prom_type==7}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">组合购</view>  
195 - <view wx:if="{{item.prom_type==10}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">阶梯促销</view> 188 + <!-- 组合购和阶梯促销要特殊出来 -->
  189 + <block wx:if="{{ pitem.sele_prom_type==7 || pitem.sele_prom_type==10 }}">
  190 + <!-- 是不是活动的最后一个商品 -->
  191 + <view class="bdb16" wx:if="{{pitem.is_duo_gd && pitem.act_arr.length>1 && items.is_act_last}}" >
  192 +
  193 + <view bindtap="switch_cx_group"
  194 + data-index="{{pidx}}"
  195 + data-gd_key="{{index}}"
  196 + class="cx-frame flex" style="position: relative">
  197 + <view class="cx-sizs fs30">促销</view>
  198 + <view class="flex ai_c f1 pdh20">
  199 + <view class="xc-coupon-fram" wx:for="{{pitem.act_arr}}" >
  200 + <view wx:if="{{item.prom_type==3}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">优惠促销</view>
  201 + <view wx:if="{{item.prom_type==5}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">搭配促销</view>
  202 + <view wx:if="{{item.prom_type==7}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">组合购</view>
  203 + <view wx:if="{{item.prom_type==10}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">阶梯促销</view>
  204 + </view>
  205 + </view>
  206 + <view class="cx-obtain-coupon wsize">
  207 + <text class="bg_jj"></text>
196 </view> 208 </view>
197 - </view>  
198 - <view class="cx-obtain-coupon wsize">  
199 - <text class="bg_jj"></text>  
200 </view> 209 </view>
201 </view> 210 </view>
202 - </view>  
203 - </block>  
204 - <block wx:else>  
205 - <view class="bdb16" wx:if="{{pitem.is_duo_gd && pitem.act_arr.length>1 && util.check_is_last(index,items.goods_id) }}" >  
206 - <view bindtap="switch_cx_group"  
207 - data-index="{{pidx}}"  
208 - data-gd_key="{{index}}"  
209 - class="cx-frame flex" style="position: relative">  
210 - <view class="cx-sizs fs30">促销</view>  
211 - <view class="flex ai_c f1 pdh20">  
212 - <view class="xc-coupon-fram" wx:for="{{pitem.act_arr}}" >  
213 - <view wx:if="{{item.prom_type==3}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">优惠促销</view>  
214 - <view wx:if="{{item.prom_type==5}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">搭配促销</view>  
215 - <view wx:if="{{item.prom_type==7}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">组合购</view>  
216 - <view wx:if="{{item.prom_type==10}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">阶梯促销</view> 211 + </block>
  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) }}" >
  214 + <view bindtap="switch_cx_group"
  215 + data-index="{{pidx}}"
  216 + data-gd_key="{{index}}"
  217 + class="cx-frame flex" style="position: relative">
  218 + <view class="cx-sizs fs30">促销</view>
  219 + <view class="flex ai_c f1 pdh20">
  220 + <view class="xc-coupon-fram" wx:for="{{pitem.act_arr}}" >
  221 + <view wx:if="{{item.prom_type==3}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">优惠促销</view>
  222 + <view wx:if="{{item.prom_type==5}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">搭配促销</view>
  223 + <view wx:if="{{item.prom_type==7}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">组合购</view>
  224 + <view wx:if="{{item.prom_type==10}}" class="xc-coupon t-c four-level-word {{!item.sele?'gray':'' }} ">阶梯促销</view>
  225 + </view>
  226 + </view>
  227 + <view class="cx-obtain-coupon wsize">
  228 + <text class="bg_jj"></text>
217 </view> 229 </view>
218 - </view>  
219 - <view class="cx-obtain-coupon wsize">  
220 - <text class="bg_jj"></text>  
221 </view> 230 </view>
222 </view> 231 </view>
  232 + </block>
  233 +
  234 + <view class="set-mes" wx:if="{{pitem.is_duo_gd && pitem.sele_prom_type==3 && util.check_is_last(index,items.goods_id) }}">
  235 + <view class="use-item" data-pidx="{{pidx}}" data-can_cx_idx="{{index}}" bindtap='no_cj_prom'>
  236 + <icon color="{{!pitem.no_cj_prom?'red':'gray'}}" size="16" type="success"></icon>
  237 + <view class="yu_er">参与优惠活动</view>
  238 + </view>
223 </view> 239 </view>
224 - </block>  
225 240
226 </block> 241 </block>
227 - </block> 242 + </block>
228 243
229 </block> 244 </block>
230 245
packageE/pages/cart/cart2/filter.wxs
@@ -27,6 +27,10 @@ function check_show(items,sele_prom_type){ @@ -27,6 +27,10 @@ function check_show(items,sele_prom_type){
27 //is_act_last 是不是最后一个 27 //is_act_last 是不是最后一个
28 28
29 function check_is_last(index,goods_id){ 29 function check_is_last(index,goods_id){
  30 +
  31 + if(!index) index='';
  32 + index+='';
  33 +
30 var gd_arr=index.split(','); 34 var gd_arr=index.split(',');
31 var idx=-1; 35 var idx=-1;
32 //-- 判断有没有包含商品 -- 36 //-- 判断有没有包含商品 --
pages/payment/pay_success/pay_success.js
@@ -30,6 +30,29 @@ Page({ @@ -30,6 +30,29 @@ Page({
30 }); 30 });
31 var type=options.type,order_sn=options.order_sn; 31 var type=options.type,order_sn=options.order_sn;
32 var th=this,order=null; 32 var th=this,order=null;
  33 +
  34 + getApp().request.promiseGet("/api/weshop/ad/page?pid=1211&store_id=" + getApp().globalData.setting.stoid, {
  35 + data: {
  36 + enabled: 1
  37 + }
  38 + }).then(res => {
  39 + if (res.data.code == 0 && res.data.data.pageData && res.data.data.pageData.length > 0) {
  40 + var a = res.data.data.pageData;
  41 + var arr = new Array();
  42 + for (var i = 0; i < a.length; i++) {
  43 + var tt = {
  44 + 'ad_code': getApp().globalData.setting.imghost + a[i].ad_code,
  45 + 'media_link': '',
  46 + 'ad_weapplink': a[i].ad_weapplink
  47 + };
  48 + arr.push(tt);
  49 + }
  50 + if (arr.length > 0) th.setData({
  51 + banner: arr,
  52 + });
  53 + }
  54 + })
  55 +
33 56
34 57
35 // 卡项订单 58 // 卡项订单
@@ -117,4 +140,10 @@ Page({ @@ -117,4 +140,10 @@ Page({
117 var url= '/pages/index/index/index'; 140 var url= '/pages/index/index/index';
118 getApp().goto(url) 141 getApp().goto(url)
119 }, 142 },
  143 +
  144 + gotoshequn:function(e){
  145 + getApp().goto(e.currentTarget.dataset.url);
  146 + },
  147 +
  148 +
120 }) 149 })
121 \ No newline at end of file 150 \ No newline at end of file
pages/payment/pay_success/pay_success.wxml
@@ -12,6 +12,39 @@ @@ -12,6 +12,39 @@
12 </view> 12 </view>
13 </view> 13 </view>
14 14
  15 +
  16 + <!-- 链接 -->
  17 + <view class="fs28 pd20" style="padding-top: 0;">
  18 + <view class="flex-center">
  19 +
  20 + <block wx:if="{{options.card == 1}}">
  21 + <!-- <view class="flex-center"> -->
  22 + <navigator class="btn border c-6" url="/packageA/pages/details_serviceCard/details_serviceCard?order_id={{order.order_id}}">
  23 + <view>订单详情</view>
  24 + </navigator>
  25 + <!-- </view> -->
  26 + <!-- <view class="flex-center"> -->
  27 + <navigator class="btn bg-red white mgl20" url="/pages/user/my_service/i_service">
  28 + <view>立即预约</view>
  29 + </navigator>
  30 + <!-- </view> -->
  31 + </block>
  32 +
  33 + <block wx:else>
  34 +
  35 + <navigator class="btn border c-6" bindtap="goto">
  36 + <view>回到首页</view>
  37 + </navigator>
  38 + <navigator class="btn bg-yellow white mgl20" url="/pages/user/order_list/order_list">
  39 + <view>查看订单</view>
  40 + </navigator>
  41 + </block>
  42 +
  43 + </view>
  44 +
  45 + </view>
  46 +
  47 +
15 <!-- 支付信息 --> 48 <!-- 支付信息 -->
16 <view class="payitem_max fs28"> 49 <view class="payitem_max fs28">
17 <!-- 订单编号 --> 50 <!-- 订单编号 -->
@@ -78,6 +111,8 @@ @@ -78,6 +111,8 @@
78 <view class="line"></view> 111 <view class="line"></view>
79 </view> 112 </view>
80 113
  114 +
  115 +
81 <!-- 跳转链接 --> 116 <!-- 跳转链接 -->
82 <view> 117 <view>
83 <!-- 个人收货信息 --> 118 <!-- 个人收货信息 -->
@@ -107,35 +142,10 @@ @@ -107,35 +142,10 @@
107 </view> 142 </view>
108 </view> 143 </view>
109 144
110 - <!-- 链接 -->  
111 - <view class="fs28 pd20 mgt40">  
112 - <view class="flex">  
113 -  
114 - <block wx:if="{{options.card == 1}}">  
115 - <!-- <view class="flex-center"> -->  
116 - <navigator class="btn f1 bg-yellow white" url="/packageA/pages/details_serviceCard/details_serviceCard?order_id={{order.order_id}}">  
117 - <view>订单详情</view>  
118 - </navigator>  
119 - <!-- </view> -->  
120 - <!-- <view class="flex-center"> -->  
121 - <navigator class="btn f1 bg-red white mgl20" url="/pages/user/my_service/i_service">  
122 - <view>立即预约</view>  
123 - </navigator>  
124 - <!-- </view> -->  
125 - </block>  
126 -  
127 - <block wx:else>  
128 - <navigator class="btn f1 bg-yellow white" url="/pages/user/order_list/order_list">  
129 - <view>查看订单</view>  
130 - </navigator>  
131 - </block>  
132 -  
133 - </view>  
134 - <view class="mgt30">  
135 - <navigator class="btn border c-6" bindtap="goto">  
136 - <view>回到首页</view>  
137 - </navigator>  
138 - </view>  
139 - </view>  
140 </view> 145 </view>
  146 +</view>
  147 +
  148 +
  149 +<view class="shequn" style="margin-top:20rpx;" bindtap="gotoshequn" wx:if="{{banner}}" data-url="{{banner[0].ad_weapplink}}">
  150 + <image src="{{banner[0].ad_code}}" mode="widthFix" style="width: 100%;border-radius: 15rpx;" />
141 </view> 151 </view>
142 \ No newline at end of file 152 \ No newline at end of file
pages/payment/pay_success/pay_success.wxss
@@ -64,11 +64,12 @@ page { @@ -64,11 +64,12 @@ page {
64 64
65 .btn { 65 .btn {
66 box-sizing: border-box; 66 box-sizing: border-box;
67 - height: 80rpx;  
68 - line-height: 80rpx; 67 + height: 75rpx;
  68 + line-height: 75rpx;
69 /* padding: 10rpx; */ 69 /* padding: 10rpx; */
70 text-align: center; 70 text-align: center;
71 - border-radius: 40rpx; 71 + border-radius: 20rpx;
  72 + padding: 0 40rpx;
72 } 73 }
73 74
74 .pay_home { 75 .pay_home {
@@ -94,3 +95,52 @@ page { @@ -94,3 +95,52 @@ page {
94 .border { 95 .border {
95 border: 2rpx solid #ccc; 96 border: 2rpx solid #ccc;
96 } 97 }
  98 +
  99 +
  100 +.shequn{
  101 + width: 94%;
  102 + margin:10rpx 23rpx 23rpx 23rpx;
  103 + min-height: 260rpx;
  104 + background: white;
  105 + border-radius: 15rpx;
  106 + display: flex;
  107 +}
  108 +
  109 +.shequnleft{
  110 + display: block;
  111 + width: 60%;
  112 + margin: 30rpx;
  113 +}
  114 +.shequnleft .one1{
  115 + display: flex;
  116 + width: 100%;
  117 + height: 110rpx;
  118 + line-height: 110rpx;
  119 + margin-top: -15rpx;
  120 + font-size: 30rpx;
  121 + color: #313131;
  122 + font-weight: bold;
  123 +}
  124 +.shequnleft .one2{
  125 + display: flex;
  126 + width: 100%;
  127 + color: #f39700;
  128 + font-size: 24rpx;
  129 +}
  130 +.shequnleft .one3{
  131 + display: flex;
  132 + width: 100%;
  133 + color: #313131;
  134 + font-size: 24rpx;
  135 +}
  136 +.shequnright{
  137 + display: flex;
  138 + width: 40%;
  139 + justify-content: center;
  140 + align-items: center;
  141 +}
  142 +
  143 +.shequnright image{
  144 + width: 150rpx;
  145 + height: 150rpx;
  146 +}