修复单规格弹窗价格不显示问题,修复关联商品价格显示问题

This commit is contained in:
2026-01-08 09:47:25 +08:00
parent 3064007137
commit 42fc09815b
2 changed files with 19 additions and 4 deletions

View File

@@ -15,7 +15,6 @@
{{ cart.memberPrice }}
</text>
</block>
<text v-else class="salePrice">{{ cart.salePrice }}</text>
</text>
</template>

View File

@@ -105,7 +105,7 @@
<view class="u-font-32">
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount"
:cart="returnFirstSku(product)" :shopUserInfo="shopUserInfo"
:cart="returnFirstSku(product)" :shopUserInfo="shopUserInfo"
:shopInfo="shopInfo"></GoodsPrice>
</view>
</view>
@@ -126,7 +126,7 @@
</view>
<!-- 占位 -->
<!-- 占位不用管下面代码也不要删除 -->
<view class="shop_bottom" style="opacity: 0;">
<view class="flex-between">
<view class="price price-sku" v-if="goods.type != 'package' && goods.result">
@@ -210,7 +210,18 @@
<text
v-if="goods.result.suitNum > 1">{{ goods.result.suitNum }}{{ goods.result.unitName }}起点</text>
</view>
<view class="price single-and-staticPackage " v-else-if="goods.type=='single'||(goods.type=='package'&&goods.groupType==0)">
<text class="i"></text>
<view class="num">
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount" :cart="goods"
:shopUserInfo="shopUserInfo" :shopInfo="shopInfo"></GoodsPrice>
</view>
<text class="i" v-if="goods.unitName">/{{ goods.unitName }}</text>
<text v-if="selSku&&selSku.suitNum > 1">{{ selSku.suitNum }}{{ selSku.unitName }}起点</text>
</view>
<view class="price price-package " v-else>
<text class="i"></text>
<view class="num">
<GoodsPrice :limitDiscount="cartStore.limitTimeDiscount" :cart="selSku"
@@ -446,7 +457,12 @@
const swiperCurrent = ref(0);
function returnFirstSku(product) {
return product.skuList[0]
console.log('returnFirstSku',product.skuList[0]);
return {
...product.skuList[0],
sku_id:product.skuList[0].id,
id:product.id,
}
}
//返回是否是多规格商品
function returnIsSkuGoods(item) {