增加确认订单会员价

This commit is contained in:
2024-11-07 17:26:44 +08:00
parent f2f5bac39e
commit 1836a5b10b

View File

@@ -160,10 +160,29 @@
</view>
</view>
<view class="">
<view class=" u-relative">
<template v-if="item.isGift">
<text class="line-th color-999">{{formatPrice(item.salePrice*item.number) }}</text>
<view class="u-absolute" style="right: 0;bottom: 100%;">
<text class="font-bold">0</text>
</view>
</template>
<template v-else>
<template v-if="isVip&&item.memberPrice&&item.memberPrice!=item.salePrice">
<text
class="line-th color-999">{{formatPrice(item.salePrice*item.number) }}</text>
<view class="u-absolute" style="right: 0;bottom: 100%;">
<text class="font-bold">{{formatPrice(item.memberPrice*item.number) }}</text>
</view>
</template>
<template v-else>
<view class="font-bold">
<text></text>
<text v-if="item.isGift">0</text>
<text v-else>{{formatPrice(item.salePrice*item.number) }}</text>
<text class="">{{formatPrice(item.salePrice*item.number) }}</text>
</view>
</template>
</template>
</view>
<view class="color-999 u-text-right u-font-24 u-m-t-12">×{{item.number}}</view>
</view>
@@ -492,9 +511,13 @@
totalNumber: 0,
totalAmount: 0,
})
const isVip=computed(()=>{
return user.value&&user.value.id&&user.value.isVip
})
const goodsPrice = computed(() => {
const goodsTotalPrice = goods.list.reduce((prve, cur) => {
const tPrice = cur.salePrice * cur.number
const memberPrice=cur.memberPrice?cur.memberPrice:cur.salePrice
const tPrice = (isVip.value? memberPrice:cur.salePrice) * cur.number
console.log(cur.isPack);
const tpackFee = cur.isPack ? cur.packFee * 1 : 0
return prve + (cur.isGift ? 0 : tPrice) + tpackFee