diff --git a/pages/goods/point.vue b/pages/goods/point.vue index ad9729f..b5d44e3 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 e413832..bf22b83 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;