From e00166ca3ea660fcf3db91d556887d0ef018a7b4 Mon Sep 17 00:00:00 2001 From: From-wh Date: Fri, 7 Jul 2023 10:29:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?improve:=20=E8=B4=AD=E4=B9=B0=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E5=A1=AB=E5=86=99=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/components/productWindow/index.vue | 2 +- template/uni-app/pages/goods_details/index.vue | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/template/uni-app/components/productWindow/index.vue b/template/uni-app/components/productWindow/index.vue index bdcd5758c..2638d9544 100644 --- a/template/uni-app/components/productWindow/index.vue +++ b/template/uni-app/components/productWindow/index.vue @@ -151,7 +151,7 @@ * */ bindCode: function(e) { - this.$emit('iptCartNum', this.attr.productSelect.cart_num); + this.$emit('iptCartNum', e); }, closeAttr: function() { this.$emit('myevent'); diff --git a/template/uni-app/pages/goods_details/index.vue b/template/uni-app/pages/goods_details/index.vue index 43c91200c..7591d087e 100644 --- a/template/uni-app/pages/goods_details/index.vue +++ b/template/uni-app/pages/goods_details/index.vue @@ -806,7 +806,15 @@ * */ iptCartNum: function(e) { - this.$set(this.attr.productSelect, "cart_num", e); + if (e) { + let number = 1 + if (Number.isInteger(parseInt(e)) && parseInt(e) > 0) { + number = parseInt(e); + } + this.$nextTick(e => { + this.$set(this.attr.productSelect, "cart_num", e < 0 ? 1 : number); + }) + } }, // 后退 returns() { From f06dcb0d074d6c1b7f400443c1cb7593d5a237d2 Mon Sep 17 00:00:00 2001 From: From-wh Date: Fri, 7 Jul 2023 10:35:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?improve:=20=E6=8A=BD=E5=B1=89=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/src/pages/order/orderList/handle/orderDetails.vue | 2 +- template/admin/src/pages/user/list/handle/userDetails.vue | 2 +- template/admin/src/pages/user/list/index.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/template/admin/src/pages/order/orderList/handle/orderDetails.vue b/template/admin/src/pages/order/orderList/handle/orderDetails.vue index ecfeb5ccf..09d94574c 100644 --- a/template/admin/src/pages/order/orderList/handle/orderDetails.vue +++ b/template/admin/src/pages/order/orderList/handle/orderDetails.vue @@ -1,6 +1,6 @@