Commit 755c6e5f058950ec701f0158a92f4e9cd1b90345

Authored by season
2 parents 4bfa39fe c5589e3c

Merge branch 'test' of http://git.vipzhuang.cn/wxd/MShopWeApp into qa

packageE/pages/cart/cart2/cart2.js
... ... @@ -8223,6 +8223,28 @@ Page({
8223 8223 }
8224 8224 }
8225 8225  
  8226 + //promise_get. 看一下有没有指定门店的限制
  8227 + let gd=null
  8228 + let gd_rs= await getApp().promiseGet('/api/weshop/goods/get/' + os.stoid + "/" + item.goods_id,{})
  8229 + if(gd_rs && gd_rs.data.code==0 && gd_rs.data.data){
  8230 + gd=gd_rs.data.data;
  8231 + }
  8232 +
  8233 + if(gd.pick_group_ids){
  8234 + var idx0=gd.pick_up_lists.findIndex(function (e){
  8235 + return e.pickup_id==pickup_id;
  8236 + })
  8237 + if(idx0<0){
  8238 + wx.showToast({
  8239 + title: item.goods_name+"的门店不可售",
  8240 + icon: 'none',
  8241 + duration: 2000
  8242 + })
  8243 + return false;
  8244 + }
  8245 + }
  8246 +
  8247 +
8226 8248 var bn_coll = th.selectComponent("#col"+cart_index); //组件的id
8227 8249 bn_coll.set_sele(index);
8228 8250  
... ...
packageE/pages/cart/cart2/cart2.wxml
... ... @@ -171,12 +171,14 @@
171 171 </block>
172 172 </block>
173 173  
174   - <view class="set-mes" wx:if="{{items.prom_type==3 || (items.prom_type==0 && item.show_can_cx[items.goods_id].no_cj_prom) }}">
175   - <view class="use-item" data-pidx="{{pidx}}" data-can_cx_idx="{{items.goods_id}}" bindtap='no_cj_prom'>
176   - <icon color="{{!item.show_can_cx[items.goods_id].no_cj_prom?'red':'gray'}}" size="16" type="success"></icon>
177   - <view class="yu_er">参与优惠活动</view>
  174 + <block wx:if="{{!items.is_gift}}">
  175 + <view class="set-mes" wx:if="{{items.prom_type==3 || (items.prom_type==0 && item.show_can_cx[items.goods_id].no_cj_prom && item.show_can_cx[items.goods_id].sele_prom_type==3) }}">
  176 + <view class="use-item" data-pidx="{{pidx}}" data-can_cx_idx="{{items.goods_id}}" bindtap='no_cj_prom'>
  177 + <icon color="{{!item.show_can_cx[items.goods_id].no_cj_prom?'red':'gray'}}" size="16" type="success"></icon>
  178 + <view class="yu_er">参与优惠活动</view>
  179 + </view>
178 180 </view>
179   - </view>
  181 + </block>
180 182  
181 183 </block>
182 184  
... ... @@ -231,7 +233,8 @@
231 233 </view>
232 234 </block>
233 235  
234   - <view class="set-mes" wx:if="{{pitem.is_duo_gd && pitem.sele_prom_type==3 && util.check_is_last(index,items.goods_id) }}">
  236 +
  237 + <view class="set-mes" wx:if="{{pitem.is_duo_gd && pitem.sele_prom_type==3 && util.check_is_last(index,items.goods_id) && !items.is_gift }}">
235 238 <view class="use-item" data-pidx="{{pidx}}" data-can_cx_idx="{{index}}" bindtap='no_cj_prom'>
236 239 <icon color="{{!pitem.no_cj_prom?'red':'gray'}}" size="16" type="success"></icon>
237 240 <view class="yu_er">参与优惠活动</view>
... ...