From 6b2da9e91d88f7bfdd7626d8626a0dc5beb4a1ee Mon Sep 17 00:00:00 2001 From: lifizer <913626195@qq.com> Date: Sun, 7 Apr 2024 16:55:19 +0800 Subject: [PATCH] =?UTF-8?q?Fix(=E5=95=86=E5=93=81):[#1071]=E5=95=86?= =?UTF-8?q?=E5=93=81=E8=AF=A6=E6=83=85=E7=9A=84=E7=AB=8B=E5=8D=B3=E8=B4=AD?= =?UTF-8?q?=E4=B9=B0=EF=BC=8C=E5=8A=A0=E5=85=A5=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E6=8C=89=E9=92=AE=EF=BC=8C=E5=8F=AA=E6=9C=89?= =?UTF-8?q?=E5=9C=A8=E5=BD=93=E5=89=8D=E5=95=86=E5=93=81=E6=89=80=E6=9C=89?= =?UTF-8?q?=E8=A7=84=E6=A0=BC=E5=BA=93=E5=AD=98=E5=85=A8=E9=83=A8=E4=B8=BA?= =?UTF-8?q?0=E6=97=B6=EF=BC=8C=E6=89=8D=E5=8F=98=E4=B8=BA=E7=81=B0?= =?UTF-8?q?=E8=89=B2=E4=B8=8D=E5=8F=AF=E7=82=B9=E5=87=BB=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/shop/GoodsCon/index.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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); },