Refactor(云灵AI):礼品商品轮播效果实现

This commit is contained in:
lifizer
2026-04-15 18:59:18 +08:00
parent 1d8b75e2d2
commit bca2513d22
6 changed files with 339 additions and 21 deletions
+3 -1
View File
@@ -35,6 +35,8 @@ export default {
},
cart_num: 1,
CartCount: 0,
// 只有一个规格时直接加入购物车;AI聊天界面则不直接加入购物车,每次都要显示规格选择弹窗
onlyOneToAddCart: true
}
},
methods: {
@@ -112,7 +114,7 @@ export default {
// 是否单一规格
const onlyOne = Object.keys(data.productValue).length === 1
if(onlyOne) {
if(onlyOne && this.onlyOneToAddCart) {
this.handleOk(() => this.getCartCount())
return
}