From 2629e5d8497b1e68ae9b83b7c80a8d3d2ff0a10c Mon Sep 17 00:00:00 2001 From: lifizer <913626195@qq.com> Date: Tue, 15 Jul 2025 15:14:11 +0800 Subject: [PATCH] =?UTF-8?q?Fix(=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8):[#388?= =?UTF-8?q?0]=E5=A2=9E=E5=8A=A0=E5=95=86=E5=93=81=E5=88=B0=E8=B4=AD?= =?UTF-8?q?=E7=89=A9=E8=BD=A6=EF=BC=8C=E7=BA=A2=E7=82=B9=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=9C=AA=E5=8F=8A=E6=97=B6=E5=90=8C=E6=AD=A5=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mixins/goCartMixins.js | 3 ++- pages/shop/GoodsList/index.vue | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mixins/goCartMixins.js b/mixins/goCartMixins.js index c7804ac..2bc136f 100644 --- a/mixins/goCartMixins.js +++ b/mixins/goCartMixins.js @@ -233,7 +233,7 @@ export default { }, - handleOk() { + handleOk(cb = '') { const productSelect = this.getAttrItemData(this.attrValue) // 如果有属性,没有选择,提示用户选择 const hasNo = (this.attr.productAttr.length && productSelect === undefined && this.isOpen) || productSelect.stock === 0 @@ -261,6 +261,7 @@ export default { icon: "none", duration: 2000 }) + cb && cb() }) }, ChangeCartNum(changeValue) { diff --git a/pages/shop/GoodsList/index.vue b/pages/shop/GoodsList/index.vue index d1149c6..8a55008 100644 --- a/pages/shop/GoodsList/index.vue +++ b/pages/shop/GoodsList/index.vue @@ -175,7 +175,7 @@ :cartNum="cart_num" :showOk="true" @changeFun="changeFun" - @ok="handleOk" + @ok="handleOk(getCartCount())" />