Commit a1a3f464bfd3a5756ce1fc34520a9d0a210b50a8
1 parent
a0948b21
商品详情的优化, 指定门店的内容
Showing
1 changed file
with
25 additions
and
5 deletions
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -3563,7 +3563,11 @@ Page({ |
3563 | 3563 | if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) { |
3564 | 3564 | |
3565 | 3565 | var pickup_ids=th.data.sele_g.pickup_ids; |
3566 | - | |
3566 | + //不是单独购买的时候,要清空商品pickup_ids | |
3567 | + if(!is_normal && th.data.prom_type>0){ | |
3568 | + pickup_ids=null; | |
3569 | + } | |
3570 | + | |
3567 | 3571 | //指定门店判断, 不是普通购买的时候,秒杀的时候,秒杀有指定门店 |
3568 | 3572 | if(!is_normal && th.data.prom_type==1 && th.data.prom_act.pick_up_lists){ |
3569 | 3573 | pickup_ids=th.data.prom_act.pick_up_lists |
... | ... | @@ -3593,23 +3597,39 @@ Page({ |
3593 | 3597 | }) |
3594 | 3598 | |
3595 | 3599 | if(idx1<0){ |
3596 | - th.data.def_pick_store.is_no_dis_nor=1; | |
3597 | 3600 | //如果是秒杀的指定门店,就要设置秒杀的 |
3598 | 3601 | if(!is_normal && th.data.prom_type==1){ |
3599 | 3602 | th.data.def_pick_store.is_no_dis_act=1; |
3600 | 3603 | }else{ |
3601 | 3604 | th.data.def_pick_store.is_no_dis_nor=1; |
3602 | 3605 | } |
3603 | - that.setData({ | |
3604 | - def_pick_store: th.data.def_pick_store | |
3605 | - }) | |
3606 | + | |
3607 | + }else{ | |
3608 | + th.data.def_pick_store.is_no_dis_nor=0; | |
3609 | + th.data.def_pick_store.is_no_dis_act=0; | |
3606 | 3610 | } |
3611 | + | |
3612 | + that.setData({ | |
3613 | + def_pick_store: th.data.def_pick_store | |
3614 | + }) | |
3615 | + | |
3607 | 3616 | } |
3608 | 3617 | |
3609 | 3618 | |
3610 | 3619 | e.data.data.pageData=ok_arr; //数组重新赋值 |
3611 | 3620 | e.data.data.total=ok_arr.length; //数组的长度 |
3612 | 3621 | } |
3622 | + else{ | |
3623 | + //-- 多规格指定门店优化 -- | |
3624 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}'){ | |
3625 | + th.data.def_pick_store.is_no_dis_nor=0; | |
3626 | + th.data.def_pick_store.is_no_dis_act=0; | |
3627 | + that.setData({ | |
3628 | + def_pick_store: th.data.def_pick_store | |
3629 | + }) | |
3630 | + } | |
3631 | + | |
3632 | + } | |
3613 | 3633 | |
3614 | 3634 | var his_cate_num = 0; |
3615 | 3635 | for (let i in e.data.data.pageData) { | ... | ... |