feat:优惠券

This commit is contained in:
2026-06-15 14:20:38 +08:00
parent cac63ff675
commit 3523cc3a21
14 changed files with 688 additions and 1137 deletions
+52 -14
View File
@@ -1,16 +1,20 @@
<template>
<view class="ping-item" @click.stop="onClick">
<image
class="top-img"
:src="obj.url"
mode="widthFix"
lazy-load
/>
<image class="top-img" :src="obj.url" mode="widthFix" lazy-load />
<view class="shop-bottom-panel">
<text class="title text-30 text-zu text-overflow">
{{ obj.title }}
</text>
<view class="flex-r-lr price-line">
<!-- 有优惠券 -->
<view class="flex-r-lr price-line coupon-line" v-if="obj.buyDeductionValue">
<view class="text-28 text-zi text-bold">
<view class="text-36 text-bold">{{ obj.buyDeductionValue }}抵扣券</view>
<view class="text-24">+{{ obj.price }}元</view>
</view>
<text class="text-20 sold">兑换</text>
</view>
<!-- 无优惠券 -->
<view class="flex-r-lr price-line" v-else>
<text class="text-28 text-zi text-bold">¥{{ obj.price }}</text>
<text class="text-24 sold">已售{{ obj.sales }}件</text>
</view>
@@ -41,7 +45,8 @@ export default {
background: #fff;
border-radius: 12rpx;
overflow: hidden;
margin-bottom: 0; /* 瀑布流父层控制间距,这里清零 */
margin-bottom: 0;
/* 瀑布流父层控制间距,这里清零 */
}
.top-img {
@@ -75,15 +80,48 @@ export default {
text-overflow: ellipsis;
white-space: nowrap;
}
.text-30 { font-size: 30rpx; }
.text-28 { font-size: 28rpx; }
.text-24 { font-size: 24rpx; }
.text-zu { color: #333; }
.text-zi { color: #7A35F6; }
.text-bold { font-weight: bold; }
.text-30 {
font-size: 30rpx;
}
.text-28 {
font-size: 28rpx;
}
.text-24 {
font-size: 24rpx;
}
.text-zu {
color: #333;
}
.text-zi {
color: #7A35F6;
}
.text-bold {
font-weight: bold;
}
.flex-r-lr {
display: flex;
justify-content: space-between;
align-items: center;
}
.coupon-line {
.sold {
width: 98rpx;
height: 64rpx;
background: linear-gradient(270deg, #B164FB 0%, #7934F6 100%);
border-radius: 8rpx;
font-size: 30rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
}
</style>