From 732aa7686c3b26c54e78531490a2b3c23e485963 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Fri, 4 Oct 2024 13:30:08 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E3=80=91=E7=A7=AF=E5=88=86=E5=95=86=E5=9F=8E=EF=BC=9A=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E8=AE=A2=E5=8D=95=E7=9B=B8=E5=85=B3=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods/point.vue | 23 +++++++++++++++++++++-- pages/order/confirm.vue | 11 ++++------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/pages/goods/point.vue b/pages/goods/point.vue index ad9729f8..b5d44e3d 100644 --- a/pages/goods/point.vue +++ b/pages/goods/point.vue @@ -94,8 +94,15 @@ " :disabled="state.goodsInfo.stock === 0" > - - {{ getShowPriceText }} + + + + {{ getShowPrice.point }} + {{ !getShowPrice.price || getShowPrice.price === 0 ? '' : `+¥${getShowPrice.price}` }} + 已售罄 立即兑换 @@ -202,6 +209,15 @@ }; }); + const getShowPriceText = computed(() => { + let priceText = `¥${fen2yuan(state.goodsInfo.price)}`; + if (!isEmpty(state.selectedSku)) { + const sku = state.selectedSku; + priceText = `${sku.point}${!sku.pointPrice ? '' : `+¥${fen2yuan(sku.pointPrice)}`}`; + } + return priceText; + }); + // 查询活动 const getActivity = async (id) => { const { data } = await PointApi.getPointActivity(id); @@ -276,6 +292,7 @@ height: 36rpx; margin: 0 4rpx; } + .point-text { font-size: 42rpx; font-weight: 500; @@ -283,6 +300,7 @@ line-height: 36rpx; font-family: OPPOSANS; } + .price-text { font-size: 42rpx; font-weight: 500; @@ -291,6 +309,7 @@ font-family: OPPOSANS; } } + .origin-price-text { font-size: 26rpx; font-weight: 400; diff --git a/pages/order/confirm.vue b/pages/order/confirm.vue index e413832a..bf22b835 100644 --- a/pages/order/confirm.vue +++ b/pages/order/confirm.vue @@ -58,17 +58,14 @@ > 积分抵扣 - {{ state.pointStatus ? '剩余积分' : '当前积分' }} + {{ state.pointStatus || state.orderPayload.pointActivityId ? '剩余积分' : '当前积分' }} - - {{ state.orderInfo.totalPoint || 0 }} - - + {{ - state.pointStatus + state.pointStatus || state.orderPayload.pointActivityId ? state.orderInfo.totalPoint - state.orderInfo.usePoint : state.orderInfo.totalPoint || 0 }} @@ -346,7 +343,7 @@ return; } state.orderInfo = data; - state.couponInfo = data.coupons; + state.couponInfo = data.coupons || []; // 设置收货地址 if (state.orderInfo.address) { addressState.value.addressInfo = state.orderInfo.address;