From 971cca08f9da49ae9cce17e366982dde8fd5a23e Mon Sep 17 00:00:00 2001 From: fanfan Date: Tue, 10 Sep 2024 20:09:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/goods/modules/MultiSpec.vue | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/views/goods/modules/MultiSpec.vue b/src/views/goods/modules/MultiSpec.vue index 37bfc86..8b1cdb3 100644 --- a/src/views/goods/modules/MultiSpec.vue +++ b/src/views/goods/modules/MultiSpec.vue @@ -312,7 +312,6 @@ export default { }, async handleSelectGoods(goodsId, item, index) { - console.log(index) const skuList = this.multiSpecData.skuList const skuItem = skuList.find((sku) => sku.goods_id === goodsId) if (skuItem) { @@ -326,16 +325,16 @@ export default { return } - const sku = res.skuList[index] - this.multiSpecData.skuList[index].goods_price = sku.goods_price - this.multiSpecData.skuList[index].cost_price = sku.cost_price - this.multiSpecData.skuList[index].stock_num = sku.stock_num - this.multiSpecData.skuList[index].goods_weight = sku.goods_weight - this.multiSpecData.skuList[index].goods_sku_no = sku.goods_sku_no - this.multiSpecData.skuList[index].goods_name = res.goods_name - this.multiSpecData.skuList[index].goods_id = res.goods_id - this.multiSpecData.skuList[index].goods_image = res.goods_image - this.multiSpecData.skuList[index].goods_price_min = res.goods_price_min + const sku = res.skuList[0] + item.goods_price = sku.goods_price + item.cost_price = sku.cost_price + item.stock_num = sku.stock_num + item.goods_weight = sku.goods_weight + item.goods_sku_no = sku.goods_sku_no + item.goods_name = res.goods_name + item.goods_id = res.goods_id + item.goods_image = res.goods_image + item.goods_price_min = res.goods_price_min }) },