Commit e44bd4efabce2142dcec9cc0b6d30654f8f8bf17
1 parent
d851efe3
购物车 不满足条件的活动要全部删除,
Showing
2 changed files
with
9 additions
and
3 deletions
pages/cart/cart/cart.js
... | ... | @@ -425,6 +425,11 @@ Page({ |
425 | 425 | item.buyqty=t_item.buyqty; |
426 | 426 | item.zh_b_num=promgoodsbuynum; |
427 | 427 | item.act=th.data.zuhe_map[item.prom_id]; |
428 | + }else{ | |
429 | + var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id; | |
430 | + getApp().request.delete(url, {}); | |
431 | + th.data.zuhe_map[item.prom_id]=-1; | |
432 | + continue; | |
428 | 433 | } |
429 | 434 | } |
430 | 435 | else if(item.prom_type == 0) { | ... | ... |
pages/cart/cart2/cart2.js
... | ... | @@ -1246,7 +1246,7 @@ Page({ |
1246 | 1246 | var cart_item = c_arr[i]; //就是每一单的意思 |
1247 | 1247 | var pickid = cart_item.pickup_id; |
1248 | 1248 | var o_price = 0; |
1249 | - var o_price_no_zh=0; //不包含限制优惠叠加组合购的金额汇总 | |
1249 | + var o_price_no_zh=0; //参与订单优惠叠加--组合购的金额汇总 | |
1250 | 1250 | var o_shipping_price = 0, goods_weight = -1, goods_piece = -1; |
1251 | 1251 | var item = c_arr[i].goods; //就是每一单的从表的意思 |
1252 | 1252 | |
... | ... | @@ -1307,8 +1307,9 @@ Page({ |
1307 | 1307 | //找到那些可以订单优惠叠加的 |
1308 | 1308 | for(let ij in zh_prom_goods){ |
1309 | 1309 | let kitem=zh_prom_goods[ij]; |
1310 | - if(kitem.act.is_orderyh) continue; | |
1311 | - o_price_no_zh-=kitem.cut_price; | |
1310 | + var is_has_zh=kitem.is_has_zh; | |
1311 | + if(kitem.act.is_orderyh) | |
1312 | + o_price_no_zh-=kitem.cut_price; | |
1312 | 1313 | } |
1313 | 1314 | } |
1314 | 1315 | } | ... | ... |