diff --git a/frontend/uni-app/src/subpackage/diyComponents/homeUserInfor.vue b/frontend/uni-app/src/subpackage/diyComponents/homeUserInfor.vue
index e8eb80d6f..f5f3b86d3 100644
--- a/frontend/uni-app/src/subpackage/diyComponents/homeUserInfor.vue
+++ b/frontend/uni-app/src/subpackage/diyComponents/homeUserInfor.vue
@@ -19,14 +19,19 @@
{{
userName
}}
-
+
- {{
- vipBadge.text
+ {{
+ badge.text
}}
@@ -74,14 +79,19 @@
{{
userName
}}
-
+
- {{
- vipBadge.text
+ {{
+ badge.text
}}
@@ -116,14 +126,19 @@
{{
userName
}}
-
+
- {{
- vipBadge.text
+ {{
+ badge.text
}}
@@ -175,14 +190,19 @@
{{
userName
}}
-
+
- {{
- vipBadge.text
+ {{
+ badge.text
}}
@@ -319,14 +339,19 @@
{{
userName
}}
-
+
- {{
- vipBadge.text
+ {{
+ badge.text
}}
@@ -996,13 +1021,24 @@ const userName = computed(() => {
if (!isLogin.value) return "请点击登录";
return (userInfo.value && userInfo.value.nickname) || "";
});
-// 付费会员标识:等级图标+等级名优先,纯付费会员展示皇冠+「付费会员」
-const vipBadge = computed(() => {
+// 等级角标与付费会员角标分开展示,避免有等级时盖掉「付费会员」
+const vipBadges = computed(() => {
+ if (!isLogin.value) return [];
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 list = [];
+ if (info.vip && (info.vip_icon || info.vip_name)) {
+ list.push({
+ icon: info.vip_icon || "",
+ text: info.vip_name || "",
+ });
+ }
+ if (info.pay_vip_status) {
+ list.push({
+ icon: "/static/images/king.png",
+ text: "付费会员",
+ });
+ }
+ return list.filter((item) => item.icon || item.text);
});
const userSubText = computed(() => {
if (!isLogin.value) return "";