Commit f3c2a294618671b434dce9f92810d5c0893094a2
1 parent
8cb7a103
团购的指定门店不可售
Showing
4 changed files
with
15 additions
and
9 deletions
pages/cart/cart/cart.js
... | ... | @@ -3357,13 +3357,18 @@ Page({ |
3357 | 3357 | if (res.data.code == 0) gd = res.data.data; |
3358 | 3358 | }) |
3359 | 3359 | |
3360 | - //判断秒杀的指定门店 | |
3361 | - if(py_type==1 && i_arr[j].prom && i_arr[j].prom.pick_up_lists){ | |
3360 | + //判断秒杀的指定门店和团购的指定门店 | |
3361 | + if([1,2].indexOf(py_type)>-1 && i_arr[j].prom && i_arr[j].prom.pick_up_lists){ | |
3362 | 3362 | var idx0=i_arr[j].prom.pick_up_lists.findIndex(function (e){ |
3363 | 3363 | return e.pickup_id==i_arr[j].pick_id; |
3364 | 3364 | }) |
3365 | 3365 | if(idx0<0){ |
3366 | - getApp().confirmBox(i_arr[j].goods_name + "秒杀活动的门店不可售"); | |
3366 | + | |
3367 | + var act_type=0; | |
3368 | + if(py_type==1) act_type='秒杀'; | |
3369 | + if(py_type==2) act_type='团购'; | |
3370 | + | |
3371 | + getApp().confirmBox(i_arr[j].goods_name + act_type+"活动的门店不可售"); | |
3367 | 3372 | wx.hideLoading(); |
3368 | 3373 | return false; |
3369 | 3374 | } | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -3645,9 +3645,9 @@ Page({ |
3645 | 3645 | } |
3646 | 3646 | |
3647 | 3647 | |
3648 | - | |
3648 | + var py=parseFloat(th.data.prom_type+''); | |
3649 | 3649 | //指定门店判断, 不是普通购买的时候,秒杀的时候,秒杀有指定门店 |
3650 | - if(!is_normal && (th.data.prom_type==1 || th.data.prom_type==6) && th.data.prom_act.pick_up_lists){ | |
3650 | + if(!is_normal && [1,2,6].indexOf(py)>-1 && th.data.prom_act.pick_up_lists){ | |
3651 | 3651 | pickup_ids=th.data.prom_act.pick_up_lists |
3652 | 3652 | } |
3653 | 3653 | |
... | ... | @@ -3675,7 +3675,7 @@ Page({ |
3675 | 3675 | |
3676 | 3676 | if(idx1<0){ |
3677 | 3677 | //如果是秒杀的指定门店,就要设置秒杀的 |
3678 | - if(!is_normal && (th.data.prom_type==1 || th.data.prom_type==6) ){ | |
3678 | + if(!is_normal && [1,2,6].indexOf(py)>-1 ){ | |
3679 | 3679 | th.data.def_pick_store.is_no_dis_act=1; |
3680 | 3680 | }else{ |
3681 | 3681 | th.data.def_pick_store.is_no_dis_nor=1; | ... | ... |
pages/user/order_detail/order_detail.js
... | ... | @@ -1038,10 +1038,11 @@ Page({ |
1038 | 1038 | var act_type=''; |
1039 | 1039 | switch (c_type){ |
1040 | 1040 | case 1:act_type='秒杀';break; |
1041 | + case 2:act_type='团购';break; | |
1041 | 1042 | case 6:act_type='拼团';break; |
1042 | 1043 | } |
1043 | 1044 | //指定门店的控制 |
1044 | - if ([1,6].indexOf(c_type)>-1 && prom.pick_up_lists) { | |
1045 | + if ([1,2,6].indexOf(c_type)>-1 && prom.pick_up_lists) { | |
1045 | 1046 | var idx0=prom.pick_up_lists.findIndex(function (e){ |
1046 | 1047 | return e.pickup_id==order.pickup_id; |
1047 | 1048 | }) | ... | ... |
pages/user/order_list/order_list.js
... | ... | @@ -778,7 +778,6 @@ Page({ |
778 | 778 | return false; |
779 | 779 | } |
780 | 780 | |
781 | - | |
782 | 781 | //-- 要进行判断指定门店的判断优化,先做普通商品 -- |
783 | 782 | if([0,3,5,7,10].indexOf(parseInt(good.prom_type))>-1 && gg.pick_group_ids && !good.is_gift){ |
784 | 783 | var idx0=gg.pick_up_lists.findIndex(function (e){ |
... | ... | @@ -1354,11 +1353,12 @@ Page({ |
1354 | 1353 | var act_type=''; |
1355 | 1354 | switch (c_type){ |
1356 | 1355 | case 1:act_type='秒杀';break; |
1356 | + case 2:act_type='团购';break; | |
1357 | 1357 | case 6:act_type='拼团';break; |
1358 | 1358 | } |
1359 | 1359 | |
1360 | 1360 | //指定门店的控制 |
1361 | - if ([1,6].indexOf(c_type)>-1 && prom.pick_up_lists) { | |
1361 | + if ([1,2,6].indexOf(c_type)>-1 && prom.pick_up_lists) { | |
1362 | 1362 | var idx0=prom.pick_up_lists.findIndex(function (e){ |
1363 | 1363 | return e.pickup_id==order.pickup_id; |
1364 | 1364 | }) | ... | ... |