diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index f182c32..814f368 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -3426,10 +3426,12 @@ Page({ }); + if (nor) that.get_sto(1); else that.get_sto(); - if (!item.whsle_id && [1,2,4,6].indexOf(item.prom_type)==-1) that.check_is_youhui(gid, that.data.is_normal); + if (!item.whsle_id && ([1,2,4,6].indexOf(item.prom_type)==-1 || this.data.is_normal==1)) + that.check_is_youhui(gid, that.data.is_normal); //默认门店要拿下门店库存 if (that.data.sales_rules >= 2 && that.data.def_pick_store && !that.data.sele_g.whsle_id && [1,2,4,6].indexOf(item.prom_type)==-1) { @@ -5165,9 +5167,10 @@ Page({ if (th.data.g_buy_num != null && th.data.sele_g.viplimited > 0) { if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id) > th.data.sele_g.viplimited) { wx.showToast({ - title: '超出商品限购', - icon: 'none', + title: '超出商品限购', + icon: 'none', }); + // s.my_warnning('超出商品限购', 0, th); var num = th.data.prom_buy_limit - th.data.prom_buy_num; if (num < 0) num = 0; @@ -5246,9 +5249,10 @@ Page({ // return s.my_warnning("商品数量不能为0", 0, th); }; if (th.data.goodsInputNum > o.store_count) { - th.setData({ - goodsInputNum: o.store_count - }) + + // th.setData({ + // goodsInputNum: o.store_count + // }) wx.showToast({ title: '超出商品库存', icon: 'none', @@ -7595,6 +7599,9 @@ Page({ this.data.is_act=1; } + console.log("11111111-gd"); + console.log(th.data.sele_g); + //-- 更新默认购买的数量 --- var mo_num=getApp().get_limit_qty(th.data.sele_g,this.data.is_act); this.setData({goodsInputNum:mo_num})