Fix:5290 【商城小程序】商品设置为抽奖活动商品后,隐藏商品增减数量按钮,若是礼品,送礼界面隐藏一人领取所有礼品开关

This commit is contained in:
linxi
2026-05-19 11:39:58 +08:00
parent 6ad916df62
commit b1aad14d43
3 changed files with 23 additions and 7 deletions
+6 -1
View File
@@ -121,6 +121,7 @@
ref="attrWindow"
:attr="attr"
:cartNum="cart_num"
:hideQuantityControls="true"
:showOk="true"
:okText="currentGoodsItem && Number(currentGoodsItem.isGiftCard) === 1 ? '送给朋友' : '立即下单'"
@changeFun="changeFun"
@@ -356,6 +357,10 @@ export default {
openGoodsSku(item) {
if (!item.id) return
this.currentGoodsItem = item
this.cart_num = 1
if (this.attr && this.attr.productSelect) {
this.$set(this.attr.productSelect, 'cart_num', 1)
}
this.addToCart(item)
},
submitFromSku() {
@@ -377,7 +382,7 @@ export default {
}
const q = {
productId: this.m_id,
cartNum: Number((this.attr.productSelect && this.attr.productSelect.cart_num) || currentSelect.cart_num || 1),
cartNum: 1,
new: 1,
uniqueId: currentSelect.unique || ''
}