diff --git a/mixins/goCartMixins.js b/mixins/goCartMixins.js index 7539661..c5a201e 100644 --- a/mixins/goCartMixins.js +++ b/mixins/goCartMixins.js @@ -254,6 +254,8 @@ export default { postCartAdd(q).then(res => { this.isOpen = false this.attr.cartAttr = false + this.$set(this.attr.productSelect, 'cart_num', 1) + this.cart_num = 1 uni.showToast({ title: "添加购物车成功", icon: "none", @@ -308,12 +310,15 @@ export default { // 修改了规格 this.attr.cartAttr = msg this.$set(this.attr.productSelect, 'cart_num', 1) + this.$forceUpdate() this.isOpen = false }, // 打开属性插件 selecAttrTap() { + this.$set(this.attr.productSelect, 'cart_num', 1) this.attr.cartAttr = true this.isOpen = true + this.$forceUpdate() }, ChangeAttr(res) { const { index, subIndex, value } = res