优化添加优惠
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
{{ item.product_name }}
|
||||
</div>
|
||||
<div class="n">x{{ formatDecimal(+item.number, 2, true) }}</div>
|
||||
<div class="p">
|
||||
<div class="p" :class="{ undeline: goodsStore.showVipPrice && item.memberPrice }">
|
||||
<template v-if="item.is_temporary">
|
||||
<template v-if="item.is_gift">
|
||||
<span class="t_line">¥{{ formatDecimal(+item.discount_sale_amount) }}</span>
|
||||
@@ -95,11 +95,25 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gift_wrap" v-if="goodsStore.showVipPrice && item.memberPrice">
|
||||
<div class="name">
|
||||
<span>[会员价]</span>
|
||||
</div>
|
||||
<div class="n"></div>
|
||||
<div class="p">
|
||||
<span>
|
||||
¥{{ formatDecimal(+item.memberPrice) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { formatDecimal } from '@/utils/index.js'
|
||||
import { useGoods } from '@/store/goods.js'
|
||||
|
||||
const goodsStore = useGoods()
|
||||
|
||||
const props = defineProps({
|
||||
list: {
|
||||
@@ -129,6 +143,11 @@ const props = defineProps({
|
||||
color: #555;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
&.undeline {
|
||||
color: #999;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
}
|
||||
|
||||
.t_line {
|
||||
|
||||
Reference in New Issue
Block a user