This commit is contained in:
2025-03-11 16:00:27 +08:00
parent de4330a0a6
commit 190cba3b6e
8 changed files with 629 additions and 1072 deletions

View File

@@ -18,8 +18,43 @@
<view :class="`common_radius_box goods_box popup_content`">
<view class="title title_box"
><text class="title_price">{{ selectGoodsData.activityPrice?selectGoodsData.activityPrice:selectGoodsData.price }}</text
>
<text
v-if="
selectGoodsData.isVipPrice == 1 &&
selectGoodsData.vipPrice != 0 &&
selectGoodsData.vipPrice != null
"
>
<text style="color: #e97512; font-weight: bold"
>¥{{ selectGoodsData.vipPrice.toFixed(2) }}</text
>
<text style="color: #fa2d12; font-size: 12px; margin-left: 4px"
>VIP到手价</text
>
<!-- <text style="color: #8a8a8a;font-size: 10px;margin-left: 4px;font-weight: bold;text-decoration: line-through;">¥{{(selectGoodsData.price).toFixed(2)}}</text> -->
</text>
<text
v-else-if="
selectGoodsData.activityPrice &&
selectGoodsData.activityPrice > 0
"
>
<text style="color: #e97512; font-weight: bold"
>¥{{ selectGoodsData.activityPrice.toFixed(2) }}</text
>
<text style="color: #613804; font-size: 12px; margin-left: 4px"
>活动价</text
>
<!-- <text style="color: #8a8a8a;font-size: 10px;margin-left: 4px;font-weight: bold;text-decoration: line-through;">¥{{(selectGoodsData.price).toFixed(2)}}</text> -->
</text>
<text v-else style="color: #e97512; font-weight: bold">
¥{{ Number(selectGoodsData.price).toFixed(2) }}</text
>
<u-icon
name="close"
color="#333"
@@ -63,10 +98,34 @@
<view :class="`goods_info `">
<view class="name">{{ slotProps.row.productName }}</view>
<view class="price" style="color: #3ab3ae"
>{{ slotProps.row.activityPrice?slotProps.row.activityPrice:slotProps.row.price }}</view
></view
>
<view class="flex_box" style="align-items: center">
<!-- <text style="color: #999; text-decoration: line-through; margin-right: 20rpx;"
v-if="slotProps.row.activityPrice > 0 && slotProps.row.activityPrice < slotProps.row.price" >¥{{slotProps.row.price}}</text>
<view class="price" style="color: #258feb"
>¥{{ slotProps.row.activityPrice?slotProps.row.activityPrice:slotProps.row.price }}</view
></view
> -->
<text v-html="getPrice(slotProps)"></text>
<text
v-if="
slotProps.row.isVipPrice == 1 &&
slotProps.row.vipPrice != 0 &&
slotProps.row.vipPrice != null
"
style="
z-index: 10;
margin-left: 10rpx;
font-size: 20rpx;
color: #f94f04;
font-weight: bold;
"
>VIP优惠</text
>
</view>
</view>
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
@@ -122,6 +181,39 @@ export default {
...mapState(["userInfo"]),
},
methods: {
getPrice(slotProps) {
if (
Number(slotProps.row.isVipPrice) === 1 &&
Number(slotProps.row.vipPrice) > 0
) {
return `
<text style="color: #e97512; font-size: 12px; font-weight: bold;">
¥${Number(slotProps.row.vipPrice).toFixed(2)}
</text>
<text
style="color: #8a8a8a; font-size: 10px; margin-left: 4px; font-weight: bold; text-decoration: line-through;"
>
¥${Number(slotProps.row.price).toFixed(2)}
</text>
`;
} else if (Number(slotProps.row.activityPrice) > 0) {
return `
<text style="color: #e97512; font-size: 12px; font-weight: bold;">
¥${Number(slotProps.row.activityPrice).toFixed(2)}
</text>
<text
style="color: #8a8a8a; font-size: 10px; margin-left: 4px; font-weight: bold; text-decoration: line-through;"
>
¥${Number(slotProps.row.price).toFixed(2)}
</text>
`;
} else {
return `<span style="color: #e97512;">
¥${Number(slotProps.row.price).toFixed(2)}</span>
`;
}
},
// 放大图片
previewImage(url) {
console.log(url);