diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue index 7907444..07b1dfa 100644 --- a/pages/shop/GoodsCon/index.vue +++ b/pages/shop/GoodsCon/index.vue @@ -335,7 +335,7 @@ @@ -344,7 +344,7 @@ @@ -1048,13 +1048,17 @@ export default { }, // 点击加入购物车按钮 joinCart: function () { - if (this.attr.productSelect.stock === 0) return; + if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0) { + return + } //0=加入购物车 this.goCat(0); }, //立即购买; tapBuy: function () { - if (this.attr.productSelect.stock === 0) return; + if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0) { + return + } // 1=直接购买 this.goCat(1); },