From e76d1a2b819fc59a51185990855208de39b550fc Mon Sep 17 00:00:00 2001 From: linxi Date: Tue, 6 May 2025 14:44:48 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A3711=20=E3=80=90=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91=E5=95=86=E8=AF=A6=E9=A1=B5?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=9A=84=E5=95=86=E5=93=81=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E4=B8=8E=E8=AE=A2=E5=8D=95=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=B2=A1=E6=9C=89=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ProductWindow.vue | 4 +--- pages/shop/GoodsCon/index.vue | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/components/ProductWindow.vue b/components/ProductWindow.vue index 226bf0e..0c7d53a 100644 --- a/components/ProductWindow.vue +++ b/components/ProductWindow.vue @@ -138,7 +138,6 @@ export default { deep: true }, cartNumber(val) { - console.log(this.attr, 'cartNumber'); if (val > this.attrObj.productSelect.stock) { val = this.attrObj.productSelect.stock } @@ -148,11 +147,9 @@ export default { }, created() { this.$set(this, 'attrObj', JSON.parse(JSON.stringify(this.attr))) - console.log(this.attrObj) }, methods: { inputNumer(e) { - console.log(e); if(e === '') { this.cartNumber = 1 this.$forceUpdate() @@ -177,6 +174,7 @@ export default { }, CartNumDes() { if(this.cartNumber === 1) return + console.log(this.cartNumber, 'cartNumber'); this.cartNumber-- this.$emit("changeFun", { action: "ChangeCartNum", value: this.cartNumber }) }, diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue index 63672a9..34ad126 100644 --- a/pages/shop/GoodsCon/index.vue +++ b/pages/shop/GoodsCon/index.vue @@ -1252,8 +1252,8 @@ export default { let stock = productSelect.stock || 0 let num = this.attr.productSelect if (changeValue) { - console.log(changeValue); - if(changeValue > 1) { + console.log(num.cart_num); + if(changeValue >= 1) { num.cart_num = changeValue } else { num.cart_num++