From 06ac07f015fec88ea431f2abb6747881870278d4 Mon Sep 17 00:00:00 2001 From: Lj <1095098147@qq.com> Date: Wed, 2 Jul 2025 22:15:16 +0800 Subject: [PATCH] =?UTF-8?q?=E2=80=98=E4=BF=AE=E6=94=B9=E6=8E=A8=E5=B9=BF?= =?UTF-8?q?=E6=A0=87=E8=AF=86=E5=B1=95=E7=A4=BA=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/subcomponent/promotion.vue | 46 +++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/pages/subcomponent/promotion.vue b/pages/subcomponent/promotion.vue index 2c7176c..7b0d972 100644 --- a/pages/subcomponent/promotion.vue +++ b/pages/subcomponent/promotion.vue @@ -27,7 +27,7 @@ - {{userInfo.type}} + {{ userTypeText }} @@ -181,7 +181,20 @@ export default { console.log(getApp().globalData.configData,'getApp().globalData.configData') const item = getApp().globalData.configData.find(i => i.keyName === 'index_lvxing') return item ? item.keyContent : '' - } + }, + userTypeText() { + return this.userInfo.isTuiTypeTitle || '用户' + }, + userTypeBadgeClass() { + switch (this.userInfo.isTuiTypeTitle) { + case '推广达人': + return 'avatar-badge-expert' + case '推广大使': + return 'avatar-badge-ambassador' + default: + return 'avatar-badge-user' + } + }, }, onLoad() { const sysInfo = uni.getSystemInfoSync() @@ -227,6 +240,7 @@ export default { this.userInfo.intentioCode = res.result.intentioCode || '' this.userInfo.money = res.result.money || '' this.userInfo.integerPrice = res.result.integerPrice || '' + this.userInfo.isTuiTypeTitle = res.result.isTuiTypeTitle ||'' // 你可以根据实际接口补充type、balance、totalWithdraw等字段 } }) @@ -432,20 +446,36 @@ export default { object-fit: cover; display: block; } - .user-type { + .avatar-badge { position: absolute; left: 0; bottom: 0; width: 100%; height: 32rpx; - background: #e5e5e5; - color: #888; - font-size: 22rpx; - font-weight: 500; - text-align: center; line-height: 32rpx; + background: rgba(238, 238, 238, 0.95); + color: #999; + font-size: 24rpx; + text-align: center; border-bottom-left-radius: 10rpx; border-bottom-right-radius: 10rpx; + font-weight: 400; + letter-spacing: 2rpx; + z-index: 2; + } + .avatar-badge-user { + background: rgba(238, 238, 238, 0.95); + color: #999; + } + .avatar-badge-expert { + background: linear-gradient(90deg, #ff8917, #ffd01e); + color: #fff; + font-weight: 600; + } + .avatar-badge-ambassador { + background: linear-gradient(90deg, #b2f08d, #39e9d2); + color: #fff; + font-weight: 600; } } }