From 6738f0e5c9b72bb0dca2805274a809876a2bffa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Wed, 8 Oct 2025 15:15:02 +0800 Subject: [PATCH] 11 --- packages/advertising/goodsDetail/index.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/advertising/goodsDetail/index.vue b/packages/advertising/goodsDetail/index.vue index c053535a..33e48261 100644 --- a/packages/advertising/goodsDetail/index.vue +++ b/packages/advertising/goodsDetail/index.vue @@ -298,6 +298,7 @@ export default { boxshadow2: false, id: "", groupById: "", + promotional_price: "", //活动价 info: "", currentIndex: "1", //当前轮播图 @@ -579,6 +580,8 @@ export default { // 使用完整的商品数据对象,而不是itemObj this.currentGG = this.info.commodity_goods_info_list[this.currentGGIndex]; + // 将promotional_price赋值给sales_price + this.currentGG.sales_price = this.promotional_price; // 设置相关属性 this.changeImg = this.currentGG.commodity_pic[0]; @@ -611,6 +614,8 @@ export default { // 切换规格 changeGG(item, index) { this.currentGG = item; + // 将promotional_price赋值给sales_price + this.currentGG.sales_price = this.promotional_price; this.currentGGIndex = index; if (this.currentGG.cart_count) { this.currentNum = this.currentGG.cart_count.count; @@ -619,7 +624,7 @@ export default { } this.changeImg = item.commodity_pic[0] this.changeName = item.goods_alias - this.changePrice = item.sales_price + this.changePrice = this.currentGG.sales_price }, car() { const item = { @@ -662,6 +667,7 @@ export default { goods_id: this.info.commodity_goods_info_list[this.currentGGIndex].id, count: countVal, + price: this.changePrice }, ], group_buy_id: this.info.commodity_goods_info_list[this.currentGGIndex].group_buy_activity_id, @@ -774,6 +780,7 @@ export default { this.localHeight = meun.height; this.id = this.itemObj.commodity_id ? this.itemObj.commodity_id : this.itemObj.id; this.groupById = this.itemObj.groupById + this.promotional_price = this.itemObj.promotional_price this.getBuyRecord() this.getEndTheCountdown(this.endTime)