|
|
@@ -239,11 +239,13 @@
|
|
|
})
|
|
|
},
|
|
|
setGoodsSpecPrice() {
|
|
|
+ console.log(this.popData.spec_ids)
|
|
|
if (this.popData.spec_ids.length > 0) {
|
|
|
let spec_ids = JSON.parse(JSON.stringify(this.popData.spec_ids))
|
|
|
spec_ids.sort((a, b) => a - b);
|
|
|
let spec_key = spec_ids.join('_')
|
|
|
this.popData.spec_key = spec_key
|
|
|
+ console.log('this.popData.spec_list[spec_key]',this.popData.spec_list[spec_key])
|
|
|
if (this.popData.spec_list[spec_key] !== undefined) {
|
|
|
this.popData.price = this.popData.spec_list[spec_key].seckill_money > 0 ? this.popData.spec_list[
|
|
|
spec_key].seckill_money : this.popData.spec_list[spec_key].price
|
|
|
@@ -254,8 +256,18 @@
|
|
|
if (cartKey >= 0) {
|
|
|
this.popData.num = this.cartData.goods_list[cartKey].goods_number
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
+ }else {
|
|
|
+ this.popData.line_price ='0.00'
|
|
|
+ this.popData.price ='0.00'
|
|
|
+ this.popData.num =0
|
|
|
+ this.popData.goods_spec_id =''
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ this.popData.price ='0.00'
|
|
|
+ this.popData.line_price ='0.00'
|
|
|
+ this.popData.num =0
|
|
|
+ this.popData.goods_spec_id =''
|
|
|
+ }
|
|
|
},
|
|
|
setShopIngList(cartData) {
|
|
|
this.cartData = cartData
|
|
|
@@ -381,6 +393,8 @@
|
|
|
this.getShopGoodsSpec(item)
|
|
|
} else {
|
|
|
this.$refs.popupGG.close();
|
|
|
+ console.log('this.popData.goods_spec_id')
|
|
|
+ console.log(this.popData.goods_spec_id)
|
|
|
if (this.popData.goods_spec_id) {
|
|
|
let cartKey = this.cartData.goods_list.findIndex(row => this.popData.goods_spec_id === row
|
|
|
.goods_spec_id)
|
|
|
@@ -395,7 +409,9 @@
|
|
|
.popData
|
|
|
.goods_spec_id, this.popData.num)
|
|
|
}
|
|
|
- }
|
|
|
+ }else {
|
|
|
+ console.log('无规格信息')
|
|
|
+ }
|
|
|
this.isAjax = false
|
|
|
}
|
|
|
},
|
|
|
@@ -685,4 +701,4 @@
|
|
|
.goods-name {
|
|
|
max-width: 310rpx;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|