|
@@ -115,7 +115,6 @@
|
|
|
number:0,
|
|
|
buyRetailPrice:0,
|
|
|
hanldChangeTabIndex:0,
|
|
|
- buttonText:'加入购物车',
|
|
|
productKind:0,
|
|
|
productTotalNum:0,
|
|
|
productTotalAmount:0,
|
|
@@ -133,22 +132,15 @@
|
|
|
})
|
|
|
},
|
|
|
hanldChangeTab(index){
|
|
|
- // console.log(this.$refs.productList.tabIndex)
|
|
|
if(index == 1){
|
|
|
this.$refs.productList.getcombinationProduct()
|
|
|
}
|
|
|
},
|
|
|
hanldalertjietiConfim(data){
|
|
|
- console.log(data,'阶梯')
|
|
|
this.ladderPriceList = data.ladderPriceList
|
|
|
- // data.ladderPriceList.forEach(item=>{
|
|
|
- // this.buyNumRangeShow =item.buyNumRangeShow;
|
|
|
- // this.buyPrice = item.buyPrice;
|
|
|
- // })
|
|
|
this.specClassjieti='show';
|
|
|
},
|
|
|
hanldOperationConfim(data){//显示选择数量确认弹窗
|
|
|
- console.log(data)
|
|
|
this.handleData = data
|
|
|
if(this.$refs.productList.tabIndex == 1){
|
|
|
if(data.productKind ==0){
|
|
@@ -228,7 +220,6 @@
|
|
|
let productID = '';
|
|
|
let productNum ='';
|
|
|
this.handleData.combinationProductList.forEach(item =>{
|
|
|
- console.log(item)
|
|
|
if(item.initProductNum >0){
|
|
|
setGoodsList.productId = item.productID
|
|
|
setGoodsList.productNum =item.initProductNum
|
|
@@ -244,13 +235,22 @@
|
|
|
console.log(params)
|
|
|
getCartAddCart({'params':JSON.stringify(params)}).then(response => {
|
|
|
this.specClasszuhe = 'hide';
|
|
|
- this.$util.msg('加入购物车成功',1500,true,'success')
|
|
|
- this.getClubProductNum()
|
|
|
+ this.$util.msg('加入购物车成功',1500,true,'success');
|
|
|
+ this.getClubProductNum();
|
|
|
+ this.clearProduct();//清空
|
|
|
setTimeout(() => {this.specClasszuhe = 'none'}, 200)
|
|
|
}).catch(error =>{
|
|
|
this.$util.msg(error.msg,2000);
|
|
|
})
|
|
|
},
|
|
|
+ clearProduct(data){
|
|
|
+ this.handleData = datadata;
|
|
|
+ console.log('清空')
|
|
|
+ console.log(this.productKind)
|
|
|
+ this.productKind= 0;
|
|
|
+ this.productTotalNum = 0;
|
|
|
+ this.productTotalAmount = 0;
|
|
|
+ },
|
|
|
getAddProductCart(){//增加购物车成功和toast弹窗提示成功
|
|
|
let params ={
|
|
|
productId:this.handleData.productID,
|
|
@@ -261,7 +261,7 @@
|
|
|
shoppingCartAddCart(params).then(response => {
|
|
|
this.specClass = 'hide';
|
|
|
this.$util.msg('加入购物车成功',1500,true,'success')
|
|
|
- this.getClubProductNum()
|
|
|
+ this.getClubProductNum();
|
|
|
setTimeout(() => {this.specClass = 'none'}, 200)
|
|
|
}).catch(error =>{
|
|
|
this.$util.msg(error.msg,2000);
|