|
|
@ -303,14 +303,14 @@ export default { |
|
|
|
const skuItem = skuList.find((sku) => sku.goods_id === goodsId) |
|
|
|
const skuItem = skuList.find((sku) => sku.goods_id === goodsId) |
|
|
|
if (skuItem) { |
|
|
|
if (skuItem) { |
|
|
|
this.$message.error('一个商品只能选择一次', 2) |
|
|
|
this.$message.error('一个商品只能选择一次', 2) |
|
|
|
return false |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.getGoodsDetail(goodsId).then((res) => { |
|
|
|
this.getGoodsDetail(goodsId).then((res) => { |
|
|
|
const queryGoodsId = this.$route.query.goodsId |
|
|
|
const queryGoodsId = this.$route.query.goodsId |
|
|
|
if (res.spec_type === 20 && queryGoodsId !== goodsId) { |
|
|
|
if (res.spec_type === 20 && queryGoodsId !== goodsId) { |
|
|
|
this.$message.error('您选择的商品是多规格商品', 2) |
|
|
|
this.$message.error('您选择的商品是多规格商品', 2) |
|
|
|
return false |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const sku = res.skuList[0] |
|
|
|
const sku = res.skuList[0] |
|
|
|