【代码优化】商城装修:修复布局为单列小图时价格显示方式不正确的问题
parent
5552236952
commit
4cdb595a2a
|
@ -39,7 +39,7 @@
|
||||||
<s-groupon-block v-if="type === 'PromotionCombination'" :data="data" :styles="styles" />
|
<s-groupon-block v-if="type === 'PromotionCombination'" :data="data" :styles="styles" />
|
||||||
<!-- 营销组件:秒杀 -->
|
<!-- 营销组件:秒杀 -->
|
||||||
<s-seckill-block v-if="type === 'PromotionSeckill'" :data="data" :styles="styles" />
|
<s-seckill-block v-if="type === 'PromotionSeckill'" :data="data" :styles="styles" />
|
||||||
<!-- 营销组件:积分商城(模式不一样,无法适配) -->
|
<!-- 营销组件:积分商城 -->
|
||||||
<s-point-block v-if="type === 'PromotionPoint'" :data="data" :styles="styles" />
|
<s-point-block v-if="type === 'PromotionPoint'" :data="data" :styles="styles" />
|
||||||
<!-- 营销组件:小程序直播(暂时没有这个功能) -->
|
<!-- 营销组件:小程序直播(暂时没有这个功能) -->
|
||||||
<s-live-block v-if="type === 'MpLive'" :data="data" :styles="styles" />
|
<s-live-block v-if="type === 'MpLive'" :data="data" :styles="styles" />
|
||||||
|
|
|
@ -254,36 +254,32 @@
|
||||||
{{ item }}
|
{{ item }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ss-flex ss-col-bottom ss-m-t-10">
|
<view v-if="goodsFields.price?.show" class="ss-flex ss-col-bottom font-OPPOSANS">
|
||||||
<view
|
<view class="sl-goods-price ss-m-r-12" :style="[{ color: goodsFields.price.color }]">
|
||||||
v-if="goodsFields.price?.show"
|
|
||||||
class="lg-goods-price ss-m-r-12 ss-flex ss-col-bottom font-OPPOSANS"
|
|
||||||
:style="[{ color: goodsFields.price.color }]"
|
|
||||||
>
|
|
||||||
<text class="ss-font-24">{{ priceUnit }}</text>
|
|
||||||
{{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
v-if="
|
|
||||||
(goodsFields.original_price?.show || goodsFields.marketPrice?.show) &&
|
|
||||||
(data.original_price > 0 || data.marketPrice > 0)
|
|
||||||
"
|
|
||||||
class="goods-origin-price ss-flex ss-col-bottom font-OPPOSANS"
|
|
||||||
:style="[{ color: originPriceColor }]"
|
|
||||||
>
|
|
||||||
<!-- 活动价格 -->
|
<!-- 活动价格 -->
|
||||||
<text v-if="data.activityType && data.activityType === PromotionActivityTypeEnum.POINT.type">
|
<text v-if="data.activityType && data.activityType === PromotionActivityTypeEnum.POINT.type">
|
||||||
{{ data.point }}积分
|
{{ data.point }}积分
|
||||||
{{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${fen2yuan(data.pointPrice)}元` }}
|
{{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${fen2yuan(data.pointPrice)}元` }}
|
||||||
</text>
|
</text>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<text class="price-unit ss-font-20">{{ priceUnit }}</text>
|
<text class="price-unit ss-font-24">{{ priceUnit }}</text>
|
||||||
<text v-if="data.promotionPrice > 0">{{ fen2yuan(data.promotionPrice) }}</text>
|
<text v-if="data.promotionPrice > 0">{{ fen2yuan(data.promotionPrice) }}</text>
|
||||||
<text v-else>
|
<text v-else>
|
||||||
{{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}
|
{{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="
|
||||||
|
(goodsFields.original_price?.show || goodsFields.marketPrice?.show) &&
|
||||||
|
(data.original_price > 0 || data.marketPrice > 0)
|
||||||
|
"
|
||||||
|
class="goods-origin-price ss-m-t-16 font-OPPOSANS ss-flex"
|
||||||
|
:style="[{ color: originPriceColor }]"
|
||||||
|
>
|
||||||
|
<text class="price-unit ss-font-20">{{ priceUnit }}</text>
|
||||||
|
<view class="ss-m-l-8">{{ fen2yuan(data.marketPrice) }}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ss-m-t-8 ss-flex ss-col-center ss-flex-wrap">
|
<view class="ss-m-t-8 ss-flex ss-col-center ss-flex-wrap">
|
||||||
<view class="sales-text">{{ salesAndStock }}</view>
|
<view class="sales-text">{{ salesAndStock }}</view>
|
||||||
|
|
Loading…
Reference in New Issue