From 6af021debfa4593b04cea1097ab36b7c83ccb566 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Tue, 15 Aug 2023 17:40:04 +0800 Subject: [PATCH] 秒杀的失效商品的优化 --- pages/goods/goodsInfo/goodsInfo.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index e32ded7..55091f3 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -2019,7 +2019,8 @@ Page({ //return s.my_warnning("库存不足!", 0, th); } - if (item.goods_num + th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit && (th.data.prom_type == 1 || th.data.prom_type == 2)) { + //秒杀有限购的时候,同时不是普通购买 + if ( item.goods_num + th.data.goodsInputNum + th.data.prom_buy_num > th.data.prom_buy_limit && th.data.prom_buy_limit>0 && !newd.is_pd_normal && (th.data.prom_type == 1 || th.data.prom_type == 2)) { wx.showToast({ title: '此商品已在购物车,去购物车结算!', icon: 'none', -- libgit2 0.21.4