Commit 9b073ad152070c493a46c1a1de1b88e5d284a03f
Merge branch 'dev_oa_fu28' into dev
Showing
6 changed files
with
336 additions
and
121 deletions
packageE/pages/cart/cart2/cart2.js
@@ -934,11 +934,11 @@ Page({ | @@ -934,11 +934,11 @@ Page({ | ||
934 | } | 934 | } |
935 | } | 935 | } |
936 | } | 936 | } |
937 | - | ||
938 | } | 937 | } |
938 | + | ||
939 | //按门店分类的数组 | 939 | //按门店分类的数组 |
940 | var arr = new Array(); | 940 | var arr = new Array(); |
941 | - | 941 | + |
942 | var th=this; | 942 | var th=this; |
943 | th.data.in_zhact_gdmap = {}; | 943 | th.data.in_zhact_gdmap = {}; |
944 | //---是不是购买等级卡成功的返回---等级卡显示的判断--- | 944 | //---是不是购买等级卡成功的返回---等级卡显示的判断--- |
@@ -6811,7 +6811,19 @@ Page({ | @@ -6811,7 +6811,19 @@ Page({ | ||
6811 | if (fid > -1) return false; | 6811 | if (fid > -1) return false; |
6812 | } | 6812 | } |
6813 | 6813 | ||
6814 | - ob.price += item.goods_price * item.goods_num; | 6814 | + //优惠促销取价的优化 |
6815 | + let f_price=item.goods_price; | ||
6816 | + if(ob.discount_field!=undefined){ | ||
6817 | + switch (ob.discount_field){ | ||
6818 | + case 0: f_price=item.goods_price;break; | ||
6819 | + case 1: f_price=item.shop_price;break; | ||
6820 | + case 2: f_price=item.market_price;break; | ||
6821 | + } | ||
6822 | + } | ||
6823 | + | ||
6824 | + item.goods_price=f_price; | ||
6825 | + | ||
6826 | + ob.price += f_price * item.goods_num; | ||
6815 | ob.goods_num += item.goods_num; | 6827 | 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 }); | 6828 | ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num }); |
6817 | 6829 | ||
@@ -6851,13 +6863,27 @@ Page({ | @@ -6851,13 +6863,27 @@ Page({ | ||
6851 | var ob = {}; | 6863 | var ob = {}; |
6852 | ob.prom_id = item.prom_id; | 6864 | ob.prom_id = item.prom_id; |
6853 | ob.name = prom.name; | 6865 | ob.name = prom.name; |
6854 | - ob.price = item.goods_price * item.goods_num; | 6866 | + |
6867 | + //优惠促销取价的优化 | ||
6868 | + let f_price=item.goods_price; | ||
6869 | + if(prom.discount_field!=undefined){ | ||
6870 | + switch (prom.discount_field){ | ||
6871 | + case 0: f_price=item.goods_price;break; | ||
6872 | + case 1: f_price=item.shop_price;break; | ||
6873 | + case 2: f_price=item.goods_market_price;break; | ||
6874 | + } | ||
6875 | + } | ||
6876 | + | ||
6877 | + item.goods_price=f_price; | ||
6878 | + | ||
6879 | + ob.price = f_price * item.goods_num; | ||
6855 | ob.goods_num = item.goods_num; | 6880 | ob.goods_num = item.goods_num; |
6856 | ob.is_bz = prom.is_bz; | 6881 | ob.is_bz = prom.is_bz; |
6857 | ob.is_xz_yh = prom.is_xz_yh; | 6882 | ob.is_xz_yh = prom.is_xz_yh; |
6858 | ob.is_xz_yh = prom.is_xz_yh; | 6883 | ob.is_xz_yh = prom.is_xz_yh; |
6859 | ob.is_order_yh = prom.is_order_yh; | 6884 | ob.is_order_yh = prom.is_order_yh; |
6860 | ob.is_post_temp = prom.is_post_temp; | 6885 | ob.is_post_temp = prom.is_post_temp; |
6886 | + ob.discount_field = prom.discount_field; | ||
6861 | ob.goods = new Array(); | 6887 | ob.goods = new Array(); |
6862 | ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num }); | 6888 | 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; | 6889 | map[pickid][item.prom_id] = ob; |
@@ -6897,14 +6923,29 @@ Page({ | @@ -6897,14 +6923,29 @@ Page({ | ||
6897 | } | 6923 | } |
6898 | }) | 6924 | }) |
6899 | 6925 | ||
6926 | + | ||
6927 | + //优惠促销取价的优化 | ||
6928 | + let f_price=item.goods_price; | ||
6929 | + | ||
6930 | + if(prom.discount_field!=undefined){ | ||
6931 | + switch (prom.discount_field){ | ||
6932 | + case 0: f_price=item.goods_price;break; | ||
6933 | + case 1: f_price=item.shop_price;break; | ||
6934 | + case 2: f_price=item.goods_market_price;break; | ||
6935 | + } | ||
6936 | + } | ||
6937 | + | ||
6938 | + item.goods_price=f_price; | ||
6939 | + | ||
6900 | ob.prom_id = item.prom_id; | 6940 | ob.prom_id = item.prom_id; |
6901 | ob.name = prom.name; | 6941 | ob.name = prom.name; |
6902 | - ob.price = item.goods_price * item.goods_num; | 6942 | + ob.price = f_price * item.goods_num; |
6903 | ob.goods_num = item.goods_num; | 6943 | ob.goods_num = item.goods_num; |
6904 | ob.is_bz = prom.is_bz; | 6944 | ob.is_bz = prom.is_bz; |
6905 | ob.is_xz_yh = prom.is_xz_yh; | 6945 | ob.is_xz_yh = prom.is_xz_yh; |
6906 | ob.is_order_yh = prom.is_order_yh; | 6946 | ob.is_order_yh = prom.is_order_yh; |
6907 | ob.is_post_temp = prom.is_post_temp; | 6947 | ob.is_post_temp = prom.is_post_temp; |
6948 | + ob.discount_field = prom.discount_field; | ||
6908 | ob.goods = new Array(); | 6949 | ob.goods = new Array(); |
6909 | ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num }); | 6950 | ob.goods.push({ goods_id: item.goods_id, goods_price: item.goods_price, goods_num: item.goods_num }); |
6910 | var obj = {}; | 6951 | var obj = {}; |
@@ -8298,6 +8339,72 @@ Page({ | @@ -8298,6 +8339,72 @@ Page({ | ||
8298 | } | 8339 | } |
8299 | } | 8340 | } |
8300 | func({'code': 0, 'msg': '成功'}) | 8341 | func({'code': 0, 'msg': '成功'}) |
8342 | + }, | ||
8343 | + | ||
8344 | + //--- 不参与优惠促销的开关 --- | ||
8345 | + no_cj_prom: function (e) { | ||
8346 | + | ||
8347 | + let th=this; | ||
8348 | + let can_cx_idx = e.currentTarget.dataset.can_cx_idx; //多促销的索引 | ||
8349 | + let pidx = e.currentTarget.dataset.pidx; //订单索引 | ||
8350 | + let item = this.data.cartlist[pidx].show_can_cx[can_cx_idx]; //促销内容 | ||
8351 | + let pk=this.data.cartlist[pidx].pickup_id; //门店ID | ||
8352 | + | ||
8353 | + //给no_cj_prom进行赋值 | ||
8354 | + item.no_cj_prom = !item.no_cj_prom ? 1 : 0; | ||
8355 | + var txt = 'cartlist[' + pidx + '].show_can_cx'; | ||
8356 | + this.setData({ | ||
8357 | + [txt]: this.data.cartlist[pidx].show_can_cx, | ||
8358 | + }) | ||
8359 | + | ||
8360 | + let ck_prom_type=item.cur_act; | ||
8361 | + //处理一下商品 | ||
8362 | + let goods0 = JSON.parse(JSON.stringify(th.data.cartlist_y)); | ||
8363 | + let goods = []; | ||
8364 | + for (var ik = 0; ik < goods0.length; ik++) { | ||
8365 | + var item_c = goods0[ik]; | ||
8366 | + if (item_c.pick_id == pk && item_c.is_collocation) continue; | ||
8367 | + goods.push(item_c); | ||
8368 | + } | ||
8369 | + | ||
8370 | + //-- 此时要把购物车中的商品确定活动 -- | ||
8371 | + for (var b = 0; b < ck_prom_type.goods.length; b++) { | ||
8372 | + //-- 开始查找 -- | ||
8373 | + var fg = goods.findIndex(function (g_item) { | ||
8374 | + return g_item.goods_id == ck_prom_type.goods[b].goods_id | ||
8375 | + && [0, 3, 5, 7, 10].indexOf(g_item.prom_type) > -1 | ||
8376 | + && g_item.pick_id == pk && g_item.is_gift == 0; | ||
8377 | + }) | ||
8378 | + if (fg > -1) { | ||
8379 | + goods[fg].prom_type = ck_prom_type.prom_type; | ||
8380 | + goods[fg].prom_id = ck_prom_type.prom_id; | ||
8381 | + | ||
8382 | + //如果是不参与的话,商品的活动状态要清理 | ||
8383 | + if(item.no_cj_prom){ | ||
8384 | + goods[fg].prom_type=0; | ||
8385 | + goods[fg].prom_id=0; | ||
8386 | + } | ||
8387 | + | ||
8388 | + for (var ik = 0; ik < th.data.cartlist[pidx].goods.length; ik++) { | ||
8389 | + if (th.data.cartlist[pidx].goods[ik].id == goods[fg].id) { | ||
8390 | + th.data.cartlist[pidx].goods[ik].prom_type = goods[fg].prom_type; | ||
8391 | + th.data.cartlist[pidx].goods[ik].prom_id = goods[fg].prom_id; | ||
8392 | + } | ||
8393 | + } | ||
8394 | + } | ||
8395 | + } | ||
8396 | + | ||
8397 | + //原始数据要有深拷贝不能有地址的牵连 | ||
8398 | + th.data.cartlist_y = JSON.parse(JSON.stringify(goods)) | ||
8399 | + | ||
8400 | + | ||
8401 | + //重新调用cart_next,进行下一步计算 | ||
8402 | + wx.showLoading({ | ||
8403 | + title: "处理中.", | ||
8404 | + }) | ||
8405 | + this.get_cart_next(null, 1, {prom_type: 0, prom_id: 0}); | ||
8406 | + | ||
8407 | + | ||
8301 | } | 8408 | } |
8302 | 8409 | ||
8303 | 8410 |
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="scaleToFill" 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:0 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 | +} |