|
@@ -224,24 +224,18 @@
|
|
},
|
|
},
|
|
getzuheCart(){//组合商品加入购物车
|
|
getzuheCart(){//组合商品加入购物车
|
|
let productInfo=[];
|
|
let productInfo=[];
|
|
- let setGoodsList ={}
|
|
|
|
|
|
+ let setGoodsList ={};
|
|
let productID = '';
|
|
let productID = '';
|
|
let productNum ='';
|
|
let productNum ='';
|
|
- let products =[];
|
|
|
|
-
|
|
|
|
this.handleData.combinationProductList.forEach(item =>{
|
|
this.handleData.combinationProductList.forEach(item =>{
|
|
console.log(item)
|
|
console.log(item)
|
|
- // let catobj={}
|
|
|
|
if(item.initProductNum >0){
|
|
if(item.initProductNum >0){
|
|
setGoodsList.productId = item.productID
|
|
setGoodsList.productId = item.productID
|
|
setGoodsList.productNum =item.initProductNum
|
|
setGoodsList.productNum =item.initProductNum
|
|
- productInfo.push(setGoodsList)
|
|
|
|
- console.log(item.initProductNum)
|
|
|
|
|
|
+ productInfo.push(JSON.parse(JSON.stringify(setGoodsList)))
|
|
}
|
|
}
|
|
-
|
|
|
|
- console.log(setGoodsList)
|
|
|
|
})
|
|
})
|
|
- // productinfo.push(setGoodsList)
|
|
|
|
|
|
+
|
|
let params ={
|
|
let params ={
|
|
clubId:this.clubID,
|
|
clubId:this.clubID,
|
|
serviceProviderId:this.serviceProviderId,
|
|
serviceProviderId:this.serviceProviderId,
|
|
@@ -249,10 +243,10 @@
|
|
}
|
|
}
|
|
console.log(params)
|
|
console.log(params)
|
|
getCartAddCart({'params':JSON.stringify(params)}).then(response => {
|
|
getCartAddCart({'params':JSON.stringify(params)}).then(response => {
|
|
- this.specClass = 'hide';
|
|
|
|
|
|
+ this.specClasszuhe = 'hide';
|
|
this.$util.msg('加入购物车成功',1500,true,'success')
|
|
this.$util.msg('加入购物车成功',1500,true,'success')
|
|
this.getClubProductNum()
|
|
this.getClubProductNum()
|
|
- setTimeout(() => {this.specClass = 'none'}, 200)
|
|
|
|
|
|
+ setTimeout(() => {this.specClasszuhe = 'none'}, 200)
|
|
}).catch(error =>{
|
|
}).catch(error =>{
|
|
this.$util.msg(error.msg,2000);
|
|
this.$util.msg(error.msg,2000);
|
|
})
|
|
})
|