Fix(商品列表):[#3880]增加商品到购物车,红点提示未及时同步更新数量

This commit is contained in:
lifizer
2025-07-15 15:14:11 +08:00
parent d774abbbc2
commit 2629e5d849
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -233,7 +233,7 @@ export default {
}, },
handleOk() { handleOk(cb = '') {
const productSelect = this.getAttrItemData(this.attrValue) const productSelect = this.getAttrItemData(this.attrValue)
// 如果有属性,没有选择,提示用户选择 // 如果有属性,没有选择,提示用户选择
const hasNo = (this.attr.productAttr.length && productSelect === undefined && this.isOpen) || productSelect.stock === 0 const hasNo = (this.attr.productAttr.length && productSelect === undefined && this.isOpen) || productSelect.stock === 0
@@ -261,6 +261,7 @@ export default {
icon: "none", icon: "none",
duration: 2000 duration: 2000
}) })
cb && cb()
}) })
}, },
ChangeCartNum(changeValue) { ChangeCartNum(changeValue) {
+1 -1
View File
@@ -175,7 +175,7 @@
:cartNum="cart_num" :cartNum="cart_num"
:showOk="true" :showOk="true"
@changeFun="changeFun" @changeFun="changeFun"
@ok="handleOk" @ok="handleOk(getCartCount())"
/> />
</view> </view>
</template> </template>