Commit d3468888836feb0e9969999e7bdc9536fda5bc27
1 parent
cce898e3
商品详情页面的优化
Showing
3 changed files
with
37 additions
and
6 deletions
pages/cart/cart/cart.js
... | ... | @@ -756,6 +756,7 @@ Page({ |
756 | 756 | data: updata1, |
757 | 757 | }) |
758 | 758 | item.goods_num = cbuy; |
759 | + item.prom=prom; //把活动写入cart_list | |
759 | 760 | } |
760 | 761 | |
761 | 762 | //价格不对,就要更新一下 |
... | ... | @@ -3338,6 +3339,11 @@ Page({ |
3338 | 3339 | if (res.data.code == 0) gd = res.data.data; |
3339 | 3340 | }) |
3340 | 3341 | |
3342 | + //判断秒杀的指定门店 | |
3343 | + if(py_type==1){ | |
3344 | + var prom=i_arr[j].prom; | |
3345 | + } | |
3346 | + | |
3341 | 3347 | if ([0, 3, 5, 7, 10].indexOf(py_type) > -1) { |
3342 | 3348 | //如果是指定门店,就要判断 |
3343 | 3349 | if(gd.pick_group_ids){ |
... | ... | @@ -3345,7 +3351,7 @@ Page({ |
3345 | 3351 | return e.pickup_id==i_arr[j].pick_id; |
3346 | 3352 | }) |
3347 | 3353 | if(idx0<0){ |
3348 | - getApp().confirmBox(i_arr[j].goods_name + "的指定门店不匹配"); | |
3354 | + getApp().confirmBox(i_arr[j].goods_name + "的门店不可售"); | |
3349 | 3355 | wx.hideLoading(); |
3350 | 3356 | return false; |
3351 | 3357 | } | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -3600,7 +3600,14 @@ Page({ |
3600 | 3600 | }) |
3601 | 3601 | |
3602 | 3602 | if(idx1<0){ |
3603 | - th.data.def_pick_store.is_no_dis_nor=1; | |
3603 | + | |
3604 | + //如果是秒杀的指定门店,就要设置秒杀的 | |
3605 | + if(!is_normal && th.data.prom_type==1){ | |
3606 | + th.data.def_pick_store.is_no_dis_act=1; | |
3607 | + }else{ | |
3608 | + th.data.def_pick_store.is_no_dis_nor=1; | |
3609 | + } | |
3610 | + | |
3604 | 3611 | that.setData({ |
3605 | 3612 | def_pick_store: th.data.def_pick_store |
3606 | 3613 | }) |
... | ... | @@ -3608,7 +3615,7 @@ Page({ |
3608 | 3615 | } |
3609 | 3616 | |
3610 | 3617 | |
3611 | - e.data.data.pageData=ok_arr; //数组重新赋值 | |
3618 | + e.data.data.pageData=ok_arr; //数组重新赋值 | |
3612 | 3619 | e.data.data.total=ok_arr.length; //数组的长度 |
3613 | 3620 | } |
3614 | 3621 | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
... | ... | @@ -709,6 +709,13 @@ |
709 | 709 | <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> |
710 | 710 | (配送不匹配) |
711 | 711 | </view> |
712 | + <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor && prom_type==0}}"> | |
713 | + (该店不可售) | |
714 | + </view> | |
715 | + <view class="no_store" wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}"> | |
716 | + (该店不可售) | |
717 | + </view> | |
718 | + | |
712 | 719 | <view class="no_store" wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules>=2 && prom_type==0 && !sele_g.whsle_id}}"> |
713 | 720 | (库存不足) |
714 | 721 | </view> |
... | ... | @@ -1322,6 +1329,8 @@ |
1322 | 1329 | <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> |
1323 | 1330 | <block wx:else> |
1324 | 1331 | <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> |
1332 | + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_nor && is_normal}}">(该店不可售)</view> | |
1333 | + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_act && !is_normal}}">(该店不可售)</view> | |
1325 | 1334 | <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules>=2 && prom_type==0 &&!sele_g.whsle_id }}"> |
1326 | 1335 | (库存不足) |
1327 | 1336 | </view> |
... | ... | @@ -1378,6 +1387,13 @@ |
1378 | 1387 | <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> |
1379 | 1388 | 配送不匹配 |
1380 | 1389 | </view> |
1390 | + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_nor && is_normal}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> | |
1391 | + 该店不可售 | |
1392 | + </view> | |
1393 | + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act && !is_normal}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> | |
1394 | + 该店不可售 | |
1395 | + </view> | |
1396 | + | |
1381 | 1397 | <block wx:else> |
1382 | 1398 | <!-- 根本就找不到门店 --> |
1383 | 1399 | <block wx:if="{{!only_pk && !def_pickpu_list}}"> |
... | ... | @@ -1633,7 +1649,8 @@ |
1633 | 1649 | <view class="fs30 xc-black3 address_name">{{item.pickup_name}} |
1634 | 1650 | <text class="c-red22" wx:if="{{item.is_no_qyt}}">(库存不足)</text> |
1635 | 1651 | <text class="c-red22" wx:elif="{{item.is_no_dis}}">(配送不匹配)</text> |
1636 | - <text class="c-red22" wx:elif="{{item.is_no_dis_nor && is_normal==1}}">(配送不匹配)</text> | |
1652 | + <text class="c-red22" wx:elif="{{item.is_no_dis_nor && is_normal}}">(该店不可售)</text> | |
1653 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act && !is_normal}}">(该店不可售)</text> | |
1637 | 1654 | </view> |
1638 | 1655 | </view> |
1639 | 1656 | <view> |
... | ... | @@ -1661,9 +1678,10 @@ |
1661 | 1678 | <view class="flex-vertical-between "> |
1662 | 1679 | <view class="flex xc-ash"> |
1663 | 1680 | <view class="fs30 xc-black3 address_name">{{item.pickup_name}} |
1664 | - <text class="c-red22" wx:if="{{item.is_no_qyt }}">(库存不足)</text> | |
1665 | 1681 | <text class="c-red22" wx:if="{{item.is_no_dis}}">(配送不匹配)</text> |
1666 | - <text class="c-red22" wx:if="{{item.is_no_dis_nor && is_normal==1}}">(配送不匹配)</text> | |
1682 | + <text class="c-red22" wx:elif="{{item.is_no_dis_nor && is_normal}}">(该店不可售)</text> | |
1683 | + <text class="c-red22" wx:elif="{{item.is_no_dis_act && !is_normal}}">(该店不可售)</text> | |
1684 | + <text class="c-red22" wx:elif="{{item.is_no_qyt }}">(库存不足)</text> | |
1667 | 1685 | </view> |
1668 | 1686 | </view> |
1669 | 1687 | <view> | ... | ... |