From 2d6ed4d31ea62dcb1b4edbc690ed3722f003ecff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Mon, 12 Oct 2026 15:05:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=A7=BB=E5=8A=A8=E7=AB=AF):=20=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E4=B8=AD=E5=BF=83=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E4=BB=98=E8=B4=B9=E4=BC=9A=E5=91=98=E6=A0=87?= =?UTF-8?q?=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 等级图标+等级名优先,纯付费会员展示皇冠+「付费会员」,五套头部样式通用 --- .../diyComponents/homeUserInfor.vue | 127 +++++++++++++++--- 1 file changed, 112 insertions(+), 15 deletions(-) diff --git a/frontend/uni-app/src/subpackage/diyComponents/homeUserInfor.vue b/frontend/uni-app/src/subpackage/diyComponents/homeUserInfor.vue index d3858ffd0..e8eb80d6f 100644 --- a/frontend/uni-app/src/subpackage/diyComponents/homeUserInfor.vue +++ b/frontend/uni-app/src/subpackage/diyComponents/homeUserInfor.vue @@ -15,9 +15,21 @@ - {{ - userName - }} + + {{ + userName + }} + + + {{ + vipBadge.text + }} + + {{ userSubText }} @@ -58,9 +70,21 @@ > - {{ - userName - }} + + {{ + userName + }} + + + {{ + vipBadge.text + }} + + {{ userSubTextPlain }} @@ -88,9 +112,21 @@ - {{ - userName - }} + + {{ + userName + }} + + + {{ + vipBadge.text + }} + + {{ userSubText }} @@ -135,9 +171,21 @@ - {{ - userName - }} + + {{ + userName + }} + + + {{ + vipBadge.text + }} + + {{ userSubTextPlain }} @@ -267,9 +315,21 @@ - {{ - userName - }} + + {{ + userName + }} + + + {{ + vipBadge.text + }} + + {{ userSubTextPlain }} @@ -936,6 +996,14 @@ const userName = computed(() => { if (!isLogin.value) return "请点击登录"; return (userInfo.value && userInfo.value.nickname) || ""; }); +// 付费会员标识:等级图标+等级名优先,纯付费会员展示皇冠+「付费会员」 +const vipBadge = computed(() => { + const info = userInfo.value || {}; + const visible = Boolean(isLogin.value && (info.pay_vip_status || info.vip)); + const icon = info.vip_icon || ""; + const text = info.vip_name || (info.pay_vip_status ? "付费会员" : ""); + return { visible: visible && Boolean(icon || text), icon, text }; +}); const userSubText = computed(() => { if (!isLogin.value) return ""; if (userInfoConfig.value == 0) @@ -1212,6 +1280,29 @@ function goLink(url) { margin-top: 0; } } + /* 付费会员标识:全部头部样式通用 */ + .vip-badge { + display: inline-flex; + align-items: center; + flex-shrink: 0; + height: 30rpx; + padding: 0 10rpx; + margin-left: 10rpx; + border-radius: 16rpx; + background: linear-gradient(90deg, #f7ddad 0%, #eec27c 100%); + .badge-icon { + width: 24rpx; + height: 24rpx; + margin-right: 4rpx; + border-radius: 50%; + } + .badge-text { + font-size: 20rpx; + line-height: 30rpx; + font-weight: 500; + color: #6b4413; + } + } } .card-header { position: relative; @@ -1249,6 +1340,12 @@ function goLink(url) { .name { font-weight: 600; } + .name-row { + min-width: 0; + .name { + max-width: 300rpx; + } + } .level { margin-top: 8rpx; opacity: 0.9;