From 2a2ce2eff63d1ea574ecc8446d8878ec28786889 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 2 Oct 2024 14:30:18 +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=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods/point.vue | 165 +++++++++++++----------------------------- 1 file changed, 51 insertions(+), 114 deletions(-) diff --git a/pages/goods/point.vue b/pages/goods/point.vue index b49f7a21..e9393a1c 100644 --- a/pages/goods/point.vue +++ b/pages/goods/point.vue @@ -28,29 +28,26 @@ /> - - - - - {{ getShowPriceText }} - - - - - - 积分价 + + + + ¥{{ getShowPrice.price }} + + + + + {{ getShowPrice.point }} - - - - 原价 - - {{ fen2yuan(state.selectedSku.marketPrice || state.goodsInfo.marketPrice) }} - + + {{ formatExchange(state.goodsInfo.sales_show_type, state.goodsInfo.sales) }} - + + 原价:¥{{ fen2yuan(state.selectedSku.marketPrice || state.goodsInfo.marketPrice) }} + {{ state.goodsInfo.name || '' }} {{ state.goodsInfo.introduction }} @@ -99,7 +96,7 @@ :disabled="state.goodsInfo.stock === 0" > - {{getShowPriceText}} + {{ getShowPriceText }} 已售罄 立即兑换 @@ -115,7 +112,7 @@ import { onLoad, onPageScroll } from '@dcloudio/uni-app'; import sheep from '@/sheep'; import { isEmpty } from 'lodash-es'; - import { fen2yuan, formatGoodsSwiper } from '@/sheep/hooks/useGoods'; + import { fen2yuan, formatExchange, formatGoodsSwiper } from '@/sheep/hooks/useGoods'; import detailNavbar from './components/detail/detail-navbar.vue'; import detailCellSku from './components/detail/detail-cell-sku.vue'; import detailTabbar from './components/detail/detail-tabbar.vue'; @@ -126,7 +123,7 @@ import { PromotionActivityTypeEnum } from '@/sheep/util/const'; import PointApi from '@/sheep/api/promotion/point'; - const headerBg = sheep.$url.css('/static/img/shop/goods/seckill-bg.png'); + const headerBg = sheep.$url.css('/static/img/shop/goods/score-bg.png'); const btnBg = sheep.$url.css('/static/img/shop/goods/seckill-btn.png'); const disabledBtnBg = sheep.$url.css('/static/img/shop/goods/activity-btn-disabled.png'); const seckillBg = sheep.$url.css('/static/img/shop/goods/seckill-tip-bg.png'); @@ -192,13 +189,18 @@ const activity = ref(); - const getShowPriceText = computed(() => { - let priceText = `${activity.value.point}积分${!activity.value.price ? '' : `+¥${fen2yuan(activity.value.price)}`}`; + const getShowPrice = computed(() => { if (!isEmpty(state.selectedSku)) { const sku = state.selectedSku; - priceText = `${sku.point}积分${!sku.pointPrice ? '' : `+¥${fen2yuan(sku.pointPrice)}`}`; + return { + point: sku.point, + price: !sku.pointPrice ? '' : fen2yuan(sku.pointPrice), + }; } - return priceText; + return { + point: activity.value.point, + price: !activity.value.price ? '' : fen2yuan(activity.value.price), + }; }); // 查询活动 @@ -264,102 +266,44 @@ .title-card { width: 710rpx; box-sizing: border-box; - // height: 320rpx; background-size: 100% 100%; border-radius: 10rpx; background-image: v-bind(headerBg); background-repeat: no-repeat; .price-box { + .point-img { + width: 36rpx; + height: 36rpx; + margin: 0 4rpx; + } + .point-text { + font-size: 42rpx; + font-weight: 500; + color: #ff3000; + line-height: 36rpx; + font-family: OPPOSANS; + } .price-text { - font-size: 30rpx; + font-size: 42rpx; font-weight: 500; - color: #fff; - line-height: normal; + color: #ff3000; + line-height: 36rpx; font-family: OPPOSANS; } } - - .origin-price { - font-size: 24rpx; + .origin-price-text { + font-size: 26rpx; font-weight: 400; - color: #fff; - opacity: 0.7; - - .origin-price-text { - text-decoration: line-through; - - font-family: OPPOSANS; - - &::before { - content: '¥'; - } - } + text-decoration: line-through; + color: $gray-c; + font-family: OPPOSANS; } - .tig { - border: 2rpx solid #ffffff; - border-radius: 4rpx; - width: 126rpx; - height: 38rpx; - - .tig-icon { - width: 40rpx; - height: 40rpx; - margin-left: -2rpx; - background: #ffffff; - border-radius: 4rpx 0 0 4rpx; - - .cicon-alarm { - font-size: 32rpx; - color: #fc6e6f; - } - } - - .tig-title { - width: 86rpx; - font-size: 24rpx; - font-weight: 500; - line-height: normal; - color: #ffffff; - display: flex; - justify-content: center; - align-items: center; - } - } - - .countdown-title { + .sales-text { font-size: 26rpx; font-weight: 500; - color: #ffffff; - } - - .countdown-time { - font-size: 26rpx; - font-weight: 500; - color: #ffffff; - - .countdown-h { - font-size: 24rpx; - font-family: OPPOSANS; - font-weight: 500; - color: #ffffff; - padding: 0 4rpx; - height: 40rpx; - background: rgba(#000000, 0.1); - border-radius: 6rpx; - } - - .countdown-num { - font-size: 24rpx; - font-family: OPPOSANS; - font-weight: 500; - color: #ffffff; - width: 40rpx; - height: 40rpx; - background: rgba(#000000, 0.1); - border-radius: 6rpx; - } + color: $gray-c; } .discounts-box { @@ -392,15 +336,13 @@ font-size: 30rpx; font-weight: bold; line-height: 42rpx; - color: #fff; } .subtitle-text { font-size: 26rpx; font-weight: 400; - color: #ffffff; + color: $dark-9; line-height: 42rpx; - opacity: 0.9; } } @@ -517,9 +459,4 @@ color: #333333; } } - - image { - width: 100%; - height: 100%; - }