diff --git a/components/diy_goodsGroup/diy_goodsGroup.wxml b/components/diy_goodsGroup/diy_goodsGroup.wxml index 670e32c..f73d30d 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.wxml +++ b/components/diy_goodsGroup/diy_goodsGroup.wxml @@ -316,7 +316,7 @@ - + diff --git a/components/diy_goodsGroup/diy_goodsGroup.wxss b/components/diy_goodsGroup/diy_goodsGroup.wxss index 6d8dd5a..fd5d8d9 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.wxss +++ b/components/diy_goodsGroup/diy_goodsGroup.wxss @@ -15,6 +15,13 @@ display: inline; width: auto; height: auto; + /* margin-left: 8rpx; + margin-top: 8rpx; */ +} + +.zwp_3 .s1_gk_a1 { + margin-left: 8rpx; + margin-top: 8rpx; } .clear { @@ -403,7 +410,7 @@ /* display: flex; margin-left: 10rpx; float: left; */ - margin-bottom: 8rpx; + /* margin-bottom: 8rpx; */ background-color: white; overflow: hidden; } diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js index 596285d..7dec844 100644 --- a/pages/cart/cart/cart.js +++ b/pages/cart/cart/cart.js @@ -1686,9 +1686,10 @@ Page({ th.check_down_line(t, pitem, item, wareIds); } else { if (t.goods_num > store_count) { - wx.showModal({ - title: '提示', - content: '购买数量超出商品库存' + wx.showToast({ + title: '购买数量超出商品库存', + icon: 'none', + // content: '购买数量超出商品库存' }); var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num"; e.setData({ @@ -1742,18 +1743,21 @@ Page({ var buyed_mum2 = t.goods_num + goodsbuynum; if (buyed_mum2 > limit && limit > 0) { - wx.showModal({ - title: '提示', - content: '购买数量超出商品限购' + wx.showToast({ + title: '购买数量超出商品限购', + icon: 'none', + // content: '购买数量超出商品限购' }); var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num"; var cbuy = limit - buyed_mum2; e.setData({ - [txt]: cbuy > 0 ? cbuy : 0, + // [txt]: cbuy > 0 ? cbuy : 0, + [txt]: cbuy > 0 ? cbuy : limit, }); e.doCheckAll(); - - t.goods_num = cbuy > 0 ? cbuy : 0, + + t.goods_num = cbuy > 0 ? cbuy : limit, + // t.goods_num = cbuy > 0 ? cbuy : 0, e.update_cart(t, pitem, item); return false; } @@ -1767,10 +1771,15 @@ Page({ success: function (res_d) { if (res_d.data.code == 0 && res_d.data.data) { if (t.goods_num > store_count) { - wx.showModal({ - title: '提示', - content: '购买数量超出商品库存' - }); + // wx.showModal({ + // title: '提示', + // content: '购买数量超出商品库存' + // }); + wx.showToast({ + title: '购买数量超出商品库存', + icon: 'none', + // content: '购买数量超出商品库存' + }); var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num"; e.setData({ [txt]: store_count @@ -1786,10 +1795,15 @@ Page({ var false_data = res_d.data.data; //--判断库存-- if (t.goods_num > false_data.goods_num - false_data.buy_num) { - wx.showModal({ - title: '提示', - content: '购买数量超出活动库存' - }); + // wx.showModal({ + // title: '提示', + // content: '购买数量超出活动库存' + // }); + wx.showToast({ + title: '购买数量超出活动库存', + icon: 'none', + // content: '购买数量超出活动库存' + }); var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num"; e.setData({ [txt]: false_data.goods_num - false_data.buy_num @@ -1804,10 +1818,15 @@ Page({ //--判断redis数量是否已经超出-- if (t.goods_num > false_data.redisnum) { - wx.showModal({ - title: '提示', - content: '购买数量超出商品库存' - }); + // wx.showModal({ + // title: '提示', + // content: '购买数量超出商品库存' + // }); + wx.showToast({ + title: '购买数量超出商品库存', + icon: 'none', + // content: '购买数量超出商品库存' + }); var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num"; e.setData({ [txt]: false_data.redisnum @@ -1821,9 +1840,14 @@ Page({ //--活动的限购是不是要判断-- if (t.goods_num + promgoodsbuynum > false_data.buy_limit && false_data.buy_limit > 0) { - wx.showModal({ - title: '提示', - content: '购买数量超出秒杀限购' + // wx.showModal({ + // title: '提示', + // content: '购买数量超出秒杀限购' + // }); + wx.showToast({ + title: '购买数量超出秒杀限购', + icon: 'none', + // content: '购买数量超出秒杀限购' }); var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num"; e.setData({ @@ -1846,10 +1870,15 @@ Page({ getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + goodsinfo.goods_id + "/" + goodsinfo.prom_id, {}).then(res => { if (res.data.code == 0 && res.data.data) { if (t.goods_num > store_count) { - wx.showModal({ - title: '提示', - content: '购买数量超出商品库存' - }); + // wx.showModal({ + // title: '提示', + // content: '购买数量超出商品库存' + // }); + wx.showToast({ + title: '购买数量超出商品库存', + icon: 'none', + // content: '购买数量超出商品库存' + }); var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num"; e.setData({ [txt]: store_count @@ -1865,9 +1894,14 @@ Page({ var gr_data = res.data.data; //--判断库存-- if (t.goods_num > gr_data.goods_num - gr_data.buy_num) { - wx.showModal({ - title: '提示', - content: '购买数量超出活动库存' + // wx.showModal({ + // title: '提示', + // content: '购买数量超出活动库存' + // }); + wx.showToast({ + title: '购买数量超出活动库存', + icon: 'none', + // content: '购买数量超出活动库存' }); var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num"; e.setData({ @@ -1883,9 +1917,14 @@ Page({ //--判断redis数量是否已经超出-- if (t.goods_num > gr_data.redisnum) { - wx.showModal({ - title: '提示', - content: '购买数量超出商品库存' + // wx.showModal({ + // title: '提示', + // content: '购买数量超出商品库存' + // }); + wx.showToast({ + title: '购买数量超出商品库存', + icon: 'none', + // content: '购买数量超出商品库存' }); var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num"; e.setData({ @@ -1900,10 +1939,15 @@ Page({ //--活动的限购是不是要判断-- if (t.goods_num + promgoodsbuynum > gr_data.buy_limit && gr_data.buy_limit > 0) { - wx.showModal({ - title: '提示', - content: '购买数量超出团购限购' - }); + // wx.showModal({ + // title: '提示', + // content: '购买数量超出团购限购' + // }); + wx.showToast({ + title: '购买数量超出团购限购', + icon: 'none', + // content: '购买数量超出团购限购' + }); var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num"; e.setData({ [txt]: gr_data.buy_limit @@ -1954,9 +1998,14 @@ Page({ }); var log = 0; if (ob.code == -1) { - wx.showModal({ - title: '提示', - content: '购买数量超出商品库存' + // wx.showModal({ + // title: '提示', + // content: '购买数量超出商品库存' + // }); + wx.showToast({ + title: '购买数量超出商品库存', + icon: 'none', + // content: '购买数量超出商品库存' }); var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num"; th.setData({ diff --git a/utils/filter.wxs b/utils/filter.wxs index 1ed0064..5825dc6 100644 --- a/utils/filter.wxs +++ b/utils/filter.wxs @@ -237,7 +237,7 @@ var filters = { if(dateType === 2) { // N天后开始 - begin_days = (o.begin_days === 0 ? o.begin_days : (o.begin_days - 1)) * 24 * 60 * 60 * 1000; + begin_days = o.begin_days * 24 * 60 * 60 * 1000; // 有效天数 days = (o.effective_days - 1) * 24 * 60 * 60 * 1000; startDate = filters.format_time2(currentDate + begin_days);