Commit 5069b9a9 by 李伟康

feat(OrderPopup): 更新多规格商品选择逻辑

- 在选择多规格商品时,将选中的商品添加到 chooseList 中
- 触发 choose 事件,传递选中的商品列表
- 优化 openSkuPopup 事件的参数传递
1 parent 0e8be092
......@@ -260,6 +260,8 @@ export default {
goodsList[index].multipleSpecificationsGoods.goods = goodsArr[0]
goodsList[index].multipleSpecificationsGoods.goods.goodsId = goodsList[index].multipleSpecificationsGoods.goods.merchantGoodsId
goodsList[index].multipleSpecificationsGoods.goods.specificationStr = goodsList[index].multipleSpecificationsGoods.goods.specificationData.replace(/;~;/g, '/')
this.chooseList.push(goodsList[index])
this.$emit('choose', this.chooseList)
} else {
//多个多规格商品时出现弹窗
goodsList[index].active = false
......@@ -272,7 +274,7 @@ export default {
goodsList[index].multipleSpecificationsGoods.skuGoodsList = goodsArr
// let chooseList = await this.getChooseList(false);
// this.$refs.skuPopupRef.open()
this.$emit('openSkuPopup',goodsList[index])
this.$emit('openSkuPopup', goodsList[index])
this.list = goodsList
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!