|
|
|
@ -288,6 +288,14 @@ |
|
|
|
|
this.cartList.valid = res.data.list; |
|
|
|
|
|
|
|
|
|
this.cartList.invalid = res.data.fail |
|
|
|
|
if(res.data.list.length == 0 && res.data.list.length == 0){ |
|
|
|
|
this.recommend = true; |
|
|
|
|
if(!this.hostProduct.length){ |
|
|
|
|
this.getHostProduct(); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
this.recommend = false |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.getCartNum(); |
|
|
|
|
}else{ |
|
|
|
@ -596,6 +604,7 @@ |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
ChangeAttr: function(res) { |
|
|
|
|
|
|
|
|
|
let productSelect = this.productValue[res]; |
|
|
|
|
this.currSku = res; |
|
|
|
|
this.newVal = this.productValue[res]; |
|
|
|
@ -664,6 +673,7 @@ |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
goCat: function() { |
|
|
|
|
console.log("yyyy") |
|
|
|
|
let that = this; |
|
|
|
|
changeCartNum(that.goods.cart_id, { |
|
|
|
|
cart_num: that.goods.cart_num, |
|
|
|
@ -680,7 +690,7 @@ |
|
|
|
|
} |
|
|
|
|
that.onMyEvent(); |
|
|
|
|
that.getCartList(true); |
|
|
|
|
that.isAllSelect = false |
|
|
|
|
that.isAllSelect = true |
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
that.$util.Tips({ |
|
|
|
@ -749,19 +759,19 @@ |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
this.cartList.valid = res.data.list; |
|
|
|
|
let newArr=JSON.parse(uni.getStorageSync('cartSelectedGoods')) |
|
|
|
|
console.log(newArr,"报错") |
|
|
|
|
this.cartList.valid.forEach(item=>{ |
|
|
|
|
item.list.forEach(p=>{ |
|
|
|
|
newArr.forEach(i=>{ |
|
|
|
|
if(p.product_id==i){ |
|
|
|
|
// let newArr=JSON.parse(uni.getStorageSync('cartSelectedGoods')) |
|
|
|
|
// console.log(newArr,"报错") |
|
|
|
|
// this.cartList.valid.forEach(item=>{ |
|
|
|
|
// item.list.forEach(p=>{ |
|
|
|
|
// newArr.forEach(i=>{ |
|
|
|
|
// if(p.product_id==i){ |
|
|
|
|
|
|
|
|
|
this.$set(p,'check',true) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
// this.$set(p,'check',true) |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
// }) |
|
|
|
|
this.cartList.invalid = res.data.fail |
|
|
|
|
if(res.data.list.length == 0 && res.data.list.length == 0){ |
|
|
|
|
this.recommend = true; |
|
|
|
@ -806,7 +816,7 @@ |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
uni.setStorageSync('cartSelectedGoods',JSON.stringify(selectedCart)) |
|
|
|
|
// uni.setStorageSync('cartSelectedGoods',JSON.stringify(selectedCart)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.cartAllCheck('goodsCheck') |
|
|
|
|