From 6d762c5367f683ed2db76fcda4b696d8f7c715f3 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 28 Sep 2024 16:33:26 +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=E6=B4=BB=E5=8A=A8=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods/point.vue | 4 --- .../s-select-seckill-sku.vue | 28 ++++++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/pages/goods/point.vue b/pages/goods/point.vue index 0360766d..b49f7a21 100644 --- a/pages/goods/point.vue +++ b/pages/goods/point.vue @@ -277,10 +277,6 @@ color: #fff; line-height: normal; font-family: OPPOSANS; - - &::before { - font-size: 30rpx; - } } } diff --git a/sheep/components/s-select-seckill-sku/s-select-seckill-sku.vue b/sheep/components/s-select-seckill-sku/s-select-seckill-sku.vue index 99b28a50..dfaf875e 100644 --- a/sheep/components/s-select-seckill-sku/s-select-seckill-sku.vue +++ b/sheep/components/s-select-seckill-sku/s-select-seckill-sku.vue @@ -19,8 +19,11 @@ {{ state.goodsInfo.name }} - - {{ fen2yuan(state.selectedSku.price || state.goodsInfo.price) }} + + {{ getShowPriceText }} + + + ¥{{ fen2yuan(state.selectedSku.price || state.goodsInfo.price) }} @@ -92,12 +95,15 @@ import { computed, reactive, watch } from 'vue'; import sheep from '@/sheep'; import { convertProductPropertyList, fen2yuan } from '@/sheep/hooks/useGoods'; - import { min } from 'lodash-es'; + import { isEmpty, min } from 'lodash-es'; + import { PromotionActivityTypeEnum } from '@/sheep/util/const'; + const emits = defineEmits(['change', 'addCart', 'buy', 'close']); const props = defineProps({ modelValue: { type: Object, - default() {}, + default() { + }, }, show: { type: Boolean, @@ -114,7 +120,14 @@ selectedSku: {}, currentPropertyArray: [], }); - + 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 propertyList = convertProductPropertyList(state.goodsInfo.skus); // SKU 列表 const skuList = computed(() => { @@ -344,11 +357,6 @@ font-weight: 500; color: $red; font-family: OPPOSANS; - - &::before { - content: '¥'; - font-size: 24rpx; - } } .stock-text {