Commit 6d6d51615f73b9b9dbc1f05d0e4d32e182b558e8
1 parent
0358cd85
组合购选择了门店,再次点击还要能购选择!
但是再添加了商品的时候,门店不能更换
Showing
2 changed files
with
8 additions
and
3 deletions
packageB/pages/zuhegou/index/index.js
... | ... | @@ -1411,9 +1411,10 @@ Page({ |
1411 | 1411 | item = th.data.sec_sto.s_arr[index]; |
1412 | 1412 | } |
1413 | 1413 | |
1414 | - if (!th.data.sele_g) return false; | |
1415 | 1414 | //判断门店的配送方式是不是匹配 |
1416 | - var g_distr_type = th.data.sele_g.distr_type; | |
1415 | + var g_distr_type=0; | |
1416 | + if (th.data.sele_g) | |
1417 | + g_distr_type = th.data.sele_g.distr_type; | |
1417 | 1418 | if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) { |
1418 | 1419 | wx.showToast({ |
1419 | 1420 | title: "门店配送方式不匹配", | ... | ... |
packageB/pages/zuhegou/index/index.wxml
... | ... | @@ -17,7 +17,11 @@ |
17 | 17 | |
18 | 18 | |
19 | 19 | <view class="c_w mt20 fs32">门店: |
20 | - <text wx:if="{{def_pick_store}}">{{def_pick_store.pickup_name}}</text> | |
20 | + <block wx:if="{{def_pick_store}}"> | |
21 | + <text wx:if="{{all_price>0}}">{{def_pick_store.pickup_name}}</text> | |
22 | + <text wx:else bindtap="choose_store">{{def_pick_store.pickup_name}}</text> | |
23 | + </block> | |
24 | + | |
21 | 25 | <text wx:else bindtap="choose_store" >请选择门店</text> |
22 | 26 | </view> |
23 | 27 | ... | ... |