From 7778a62d6a962d4f2ee7c5eca69d6de902708c51 Mon Sep 17 00:00:00 2001 From: Yer11214 <17633066053@163.com> Date: Mon, 15 Jul 2024 15:24:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E6=94=B9bug=E5=9C=A8?= =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E5=95=86=E5=93=81=E4=B8=AD=E8=A7=84=E6=A0=BC?= =?UTF-8?q?=E4=B8=BA0=E4=B8=8D=E5=8F=AF=E7=BC=96=E8=BE=91=E3=80=81?= =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E3=80=81=E6=96=B0=E5=A2=9E=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E4=B8=BA0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/m-buy/goods.vue | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/components/m-buy/goods.vue b/components/m-buy/goods.vue index 6605795..df69e8e 100644 --- a/components/m-buy/goods.vue +++ b/components/m-buy/goods.vue @@ -93,14 +93,17 @@ +
+ +
- + 数量 - + - + 加入购物车 立即购买 @@ -209,6 +212,18 @@ export default { this.$emit('changed', val); }, deep: true + }, + 'goodsDetail.quantity': { + handler(val) { + if (val == 0) { + uni.showToast({ + title: '商品已售罄', + duration: 2000, + icon: 'none' + }) + this.num = 1; + } + } } }, @@ -400,6 +415,8 @@ export default { mounted() { this.formatSku(this.goodsSpec); + + console.log("goodsDetail",this.goodsDetail) } }; @@ -460,6 +477,9 @@ export default { // #endif margin-bottom: 10rpx; } +.soldout{ + margin: 20rpx 0; +} .goods-skus-view { overflow: hidden;