Feat:礼包列表增加角标

This commit is contained in:
LinCyJang
2026-08-02 11:12:53 +08:00
parent 9f843f3bba
commit 50fe0e78c8
+35
View File
@@ -23,6 +23,12 @@
:key="index"
class="gift-item"
>
<view
v-if="item.badgeText"
:class="['gift-badge',['wholesalerCustom', 'wholesalerPurchase'].includes(item.sceneType) ? 'gift-badge-blue' : 'gift-badge-orange']"
>
{{ item.badgeText }}
</view>
<view
v-for="(cart, cartIndex) in item.giftInfo"
:key="cartIndex"
@@ -137,6 +143,12 @@
:key="index"
class="gift-item"
>
<view
v-if="item.badgeText"
:class="['gift-badge', ['wholesalerCustom', 'wholesalerPurchase'].includes(item.sceneType) ? 'gift-badge-blue' : 'gift-badge-orange']"
>
{{ item.badgeText }}
</view>
<view
v-for="(cart, cartIndex) in item._renderGiftInfos"
:key="cartIndex"
@@ -642,10 +654,33 @@ export default {
z-index: 2;
padding: 84rpx 0 80rpx 0;
.gift-item {
position: relative;
padding: 16rpx;
margin: 0 0 24rpx;
border-radius: 16rpx;
background-color: #ffff;
.gift-badge {
position: absolute;
top: 0;
right: 0;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
width: fit-content;
height: 48rpx;
border-radius: 0rpx 16rpx 0rpx 24rpx;
font-size: 26rpx;
color: #fff;
padding: 0 12rpx;
line-height: 1;
}
.gift-badge-blue {
background: #28AAF4;
}
.gift-badge-orange {
background: #FF9644;
}
.gift-body {
display: flex;
align-items: center;