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++