优化价格显示的先后顺序

This commit is contained in:
gyq
2025-11-18 16:20:35 +08:00
parent bca332f7b8
commit bb06553701
4 changed files with 42 additions and 44 deletions

View File

@@ -19,7 +19,7 @@
</div>
</template>
<template v-else>
<div class="price" v-if="item.is_time_discount == 1">
<div class="price" v-if="item.is_time_discount == 1 && item.discount_sale_amount <= 0">
<span class="dis">
{{ formatDecimal(+item.salePrice, 2, true) }}
</span>
@@ -34,15 +34,12 @@
</span>
</div>
<div class="price" v-else>
<template v-if="+props.item.discount_sale_amount">
<template v-if="+item.discount_sale_amount > 0">
<span class="dis">
{{ formatDecimal(goodsStore.showVipPrice ? +props.item.memberPrice ||
+props.item.lowPrice
: +props.item.lowPrice,
2, true) }}
{{ formatDecimal(+item.salePrice, 2, true) }}
</span>
<span>
{{ formatDecimal(+props.item.discount_sale_amount, 2, true) }}
{{ formatDecimal(+item.discount_sale_amount, 2, true) }}
</span>
</template>
<div class="flex" v-else>
@@ -78,7 +75,7 @@
</div>
<div class="num">
<div class="left">
<div class="icon_item zen" v-if="item.is_time_discount">
<div class="icon_item zen" v-if="item.is_time_discount && item.discount_sale_amount <= 0">
<span class="t">限时折扣</span>
</div>
<div class="icon_item zen" v-if="props.item.is_gift">

View File

@@ -19,20 +19,20 @@
</template>
<template v-else>
<template v-if="item.is_gift">
<span class="t_line">{{ formatDecimal(+item.lowPrice) }}</span>
<span class="t_line">{{ formatDecimal(+item.salePrice) }}</span>
0.00
</template>
<template v-else>
<template v-if="+item.discount_sale_amount">
<span class="t_line">
{{ formatDecimal(+item.lowPrice) }}
</span>
<template v-if="+item.discount_sale_amount > 0">
<!-- <span class="t_line">
{{ formatDecimal(+item.salePrice) }}
</span> -->
<span>
{{ formatDecimal(+item.discount_sale_amount) }}
</span>
</template>
<template v-else>
{{ formatDecimal(+item.lowPrice) }}
{{ formatDecimal(+item.salePrice) }}
</template>
</template>
</template>
@@ -85,7 +85,8 @@
</span>
</div>
</div>
<div class="gift_wrap" v-if="goodsStore.showVipPrice && item.memberPrice && !item.is_time_discount">
<div class="gift_wrap"
v-if="goodsStore.showVipPrice && item.memberPrice && !item.is_time_discount && item.discount_sale_amount <= 0">
<div class="name">
<span>[会员价]</span>
</div>
@@ -96,7 +97,7 @@
</span>
</div>
</div>
<div class="gift_wrap" v-if="item.is_time_discount">
<div class="gift_wrap" v-if="item.is_time_discount && item.discount_sale_amount <= 0">
<template v-if="item.time_dicount_mode == 'vip-price'">
<div class="name">
<span>[会员价]</span>