|
|
@ -760,6 +760,13 @@ |
|
|
|
this.$set(this.attr.productSelect, 'cart_num', 1) |
|
|
|
this.$set(this.attr.productSelect, 'cart_num', 1) |
|
|
|
this.$set(this, 'attrValue', res.value) |
|
|
|
this.$set(this, 'attrValue', res.value) |
|
|
|
this.$set(this, 'attrTxt', '已选择') |
|
|
|
this.$set(this, 'attrTxt', '已选择') |
|
|
|
|
|
|
|
let stock = productSelect.stock || 0; |
|
|
|
|
|
|
|
let num = this.attr.productSelect; |
|
|
|
|
|
|
|
if (num.cart_num > stock) { |
|
|
|
|
|
|
|
this.$set(this, 'cart_num', stock) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.$set(this, 'cart_num', 1) |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$set(this.attr.productSelect, 'image', this.storeInfo.image) |
|
|
|
this.$set(this.attr.productSelect, 'image', this.storeInfo.image) |
|
|
|
this.$set(this.attr.productSelect, 'price', this.storeInfo.price) |
|
|
|
this.$set(this.attr.productSelect, 'price', this.storeInfo.price) |
|
|
|