|
|
@@ -213,7 +213,17 @@
|
|
|
this.popData.spec_key = ''
|
|
|
this.popData.num = 0
|
|
|
this.popData.spec_ids = []
|
|
|
- }
|
|
|
+ }else {
|
|
|
+ this.popData.num =0;
|
|
|
+ if(this.cartData.goods_list.length>0){
|
|
|
+ this.cartData.goods_list.forEach(item=>{
|
|
|
+ if(item.spec_sku_id===this.popData.spec_key){
|
|
|
+ this.popData.num = item.goods_number
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
this.popData.spec_list = res.data.spec_list
|
|
|
this.popData.spec_attr = res.data.spec_attr
|
|
|
this.$refs.popupGG.open();
|
|
|
@@ -236,8 +246,10 @@
|
|
|
spec_key].seckill_money : this.popData.spec_list[spec_key].price
|
|
|
this.popData.line_price = this.popData.spec_list[spec_key].line_price
|
|
|
this.popData.goods_spec_id = this.popData.spec_list[spec_key].goods_spec_id + ''
|
|
|
- let cartKey = this.cartData.goods_list.findIndex(row => this.popData.goods_spec_id === row
|
|
|
- .goods_spec_id)
|
|
|
+ let cartKey = this.cartData.goods_list.findIndex(row => this.popData.goods_spec_id*1 === row.goods_spec_id*1)
|
|
|
+ console.log('this.popData.goods_spec_id:-------------------------------------------')
|
|
|
+ console.log(this.popData.goods_spec_id)
|
|
|
+ console.log(cartKey)
|
|
|
if (cartKey >= 0) {
|
|
|
this.popData.num = this.cartData.goods_list[cartKey].goods_number
|
|
|
}
|