Fix:5265 【商城小程序】点击购物车按钮选择多个活动商品,跳转下单页面时商品数量仍显示为1
This commit is contained in:
@@ -360,7 +360,10 @@ export default {
|
|||||||
},
|
},
|
||||||
submitFromSku() {
|
submitFromSku() {
|
||||||
const productSelect = this.getAttrItemData(this.attrValue)
|
const productSelect = this.getAttrItemData(this.attrValue)
|
||||||
const currentSelect = productSelect || this.attr.productSelect || {}
|
const currentSelect = {
|
||||||
|
...(productSelect || {}),
|
||||||
|
...(this.attr.productSelect || {})
|
||||||
|
}
|
||||||
const isGiftOrder = Number(this.currentGoodsItem && this.currentGoodsItem.isGiftCard) === 1
|
const isGiftOrder = Number(this.currentGoodsItem && this.currentGoodsItem.isGiftCard) === 1
|
||||||
const stock = Number(currentSelect.stock || 0)
|
const stock = Number(currentSelect.stock || 0)
|
||||||
const hasNo = (this.attr.productAttr.length && !productSelect && this.isOpen) || stock <= 0
|
const hasNo = (this.attr.productAttr.length && !productSelect && this.isOpen) || stock <= 0
|
||||||
@@ -374,7 +377,7 @@ export default {
|
|||||||
}
|
}
|
||||||
const q = {
|
const q = {
|
||||||
productId: this.m_id,
|
productId: this.m_id,
|
||||||
cartNum: Number(currentSelect.cart_num || 1),
|
cartNum: Number((this.attr.productSelect && this.attr.productSelect.cart_num) || currentSelect.cart_num || 1),
|
||||||
new: 1,
|
new: 1,
|
||||||
uniqueId: currentSelect.unique || ''
|
uniqueId: currentSelect.unique || ''
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user