代客下单,订单管理修改会员价的判断依据,增加isMember字段

This commit is contained in:
2024-11-18 15:05:11 +08:00
parent 16cfbfec63
commit 40514ef243
4 changed files with 30 additions and 11 deletions

View File

@@ -512,13 +512,12 @@
totalAmount: 0,
})
const isVip=computed(()=>{
return user.value&&user.value.id&&user.value.isVip
return $shop.isVip&& user.value&&user.value.id&&user.value.isVip
})
const goodsPrice = computed(() => {
const goodsTotalPrice = goods.list.reduce((prve, cur) => {
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
}, 0)