From 5af6c8d1c909b1dc11ab8425fa7c8018ce8dca1d Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Sat, 12 Oct 2024 18:23:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E8=AE=A2=E5=8D=95=E6=89=93=E5=8C=85=E8=B4=B9=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagesCreateOrder/confirm-order/confirm-order.vue | 7 +++++-- pagesCreateOrder/util.js | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue index ed2bd6b..377cbfc 100644 --- a/pagesCreateOrder/confirm-order/confirm-order.vue +++ b/pagesCreateOrder/confirm-order/confirm-order.vue @@ -478,12 +478,15 @@ }) const goodsPrice = computed(() => { const goodsTotalPrice = goods.list.reduce((prve, cur) => { - const tPrice=cur.salePrice * cur.number+cur.packFee*1 - return prve +(cur.isGift?0:tPrice) + const tPrice=cur.salePrice * cur.number + console.log(cur.isPack); + const tpackFee=cur.isPack? cur.packFee*1:0 + return prve +(cur.isGift?0:tPrice) +tpackFee }, 0) return (goodsTotalPrice|| 0).toFixed(2) }) const allPrice = computed(() => { + console.log(goodsPrice.value); const n=goodsPrice.value*1 + $seatFee.totalAmount return n.toFixed(2) // const goodsTotalPrice = goods.list.reduce((prve, cur) => { diff --git a/pagesCreateOrder/util.js b/pagesCreateOrder/util.js index 92e5471..d584538 100644 --- a/pagesCreateOrder/util.js +++ b/pagesCreateOrder/util.js @@ -15,6 +15,7 @@ export function getNowCart(records) { arr[index].number = arr[index].number * 1 + item.number arr[index].totalNumber = arr[index].totalNumber * 1 + item.totalNumber arr[index].totalAmount = arr[index].totalAmount * 1 + item.totalAmount + arr[index].packFee = arr[index].packFee * 1 + item.packFee } else { arr.push({ ...item,