修复确认订单会员价未展示问题,以及增加总优惠金额
This commit is contained in:
parent
cad9e052bc
commit
da7474c9d5
|
|
@ -17,15 +17,17 @@
|
|||
<!-- <view class="headeimg">
|
||||
<image class="img" :src="user.headImg" mode=""></image>
|
||||
</view> -->
|
||||
<view class="u-m-l-20">{{user.nickName}}</view>
|
||||
<view class="color-main u-m-l-10 u-font-24">{{user.isVip?'会员':'' }}</view>
|
||||
<view class="u-font-24 u-m-l-30"><text>余额:</text><text
|
||||
<view class="u-m-l-20">
|
||||
<!-- <view class="color-main u-font-24 no-wrap">{{user.isVip?'会员':'' }}</view> -->
|
||||
<view class="">{{user.nickName}}</view>
|
||||
</view>
|
||||
<view class="u-font-24 u-m-l-30 u-text-center"><text>余额:</text><text
|
||||
class="color-main">{{user.amount}}</text>
|
||||
</view>
|
||||
<view class="u-font-24 u-m-l-30"><text>积分:</text><text
|
||||
<view class="u-font-24 u-m-l-30 u-text-center"><text>积分:</text><text
|
||||
class="color-main">{{user.accountPoints}}</text></view>
|
||||
</view>
|
||||
<uni-icons type="right" color="#999" size="16"></uni-icons>
|
||||
<uni-icons type="right" color="#999" size="20" bold></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class=" ">
|
||||
|
|
@ -168,7 +170,7 @@
|
|||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="isVip&&item.memberPrice&&item.memberPrice!=item.salePrice">
|
||||
<template v-if="isVip&&item.memberPrice&&item.memberPrice*1!=item.salePrice*1">
|
||||
<text
|
||||
class="line-th color-999">¥{{formatPrice(item.salePrice*item.number) }}</text>
|
||||
<view class="u-absolute" style="right: 0;bottom: 100%;">
|
||||
|
|
@ -239,10 +241,17 @@
|
|||
|
||||
|
||||
|
||||
<view class="u-flex u-row-right u-m-t-38">
|
||||
<view class="u-flex u-row-between u-m-t-38">
|
||||
<!-- <template v-if="$shop.registerType=='munchies'">
|
||||
<view class="color-main" @tap="showModel('editMoney')">修改</view>
|
||||
</template> -->
|
||||
<view class="u-flex">
|
||||
<view class="u-flex price" v-if="youhui*1>0">
|
||||
<view class="">优惠金额</view>
|
||||
<view class="font-bold u-font-32">¥{{formatPrice(youhui) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="u-flex price u-m-l-32">
|
||||
<view class="">实收金额</view>
|
||||
<view class="font-bold u-font-32">¥{{formatPrice(allPrice) }}</view>
|
||||
|
|
@ -512,7 +521,7 @@
|
|||
totalAmount: 0,
|
||||
})
|
||||
const isVip=computed(()=>{
|
||||
return $shop.isMemberPrice&& user.value&&user.value.id&&user.value.isVip
|
||||
return $shop.value.isMemberPrice&& user.value&&user.value.id&&user.value.isVip
|
||||
})
|
||||
const goodsPrice = computed(() => {
|
||||
const goodsTotalPrice = goods.list.reduce((prve, cur) => {
|
||||
|
|
@ -532,6 +541,19 @@
|
|||
// }, 0)
|
||||
// return (goodsTotalPrice + ($seatFee.totalAmount || 0)).toFixed(2)
|
||||
})
|
||||
const youhui=computed(()=>{
|
||||
if(user.value&&user.value.id&&user.value.isVip){
|
||||
const goodsTotalPrice = goods.list.reduce((prve, cur) => {
|
||||
const tPrice = cur.salePrice * cur.number
|
||||
const tpackFee = cur.isPack ? cur.packFee * 1 : 0
|
||||
return prve + tPrice + tpackFee
|
||||
}, 0)
|
||||
return goodsTotalPrice-allPrice.value
|
||||
}else{
|
||||
return 0
|
||||
}
|
||||
return goodsTotalPrice
|
||||
})
|
||||
|
||||
function setGoodsItem(key, val) {
|
||||
item[key] = val
|
||||
|
|
|
|||
Loading…
Reference in New Issue