feat(user-tag): 后台用户列表展示标签 + 小程序用户中心会员等级下方展示标签

后台 msh_single_admin user/list/index.vue:
- 在「分组」「推荐人」之间新增「用户标签」列,用 el-tag 渲染(多标签 ',' 切分)
- 加入默认显示项 checkedCities / columnData

后端 UserCenterResponse + UserServiceImpl:
- UserCenterResponse 新增 tagName 字段
- getUserCenter 在已注入的 userTagService 基础上回填标签名(已存在 getGroupNameInId)

小程序 pages/user/index.vue:
- 用户名 + VIP 行下方新增 .user-tags 容器,按 ',' 切分多标签
- 半透明白底胶囊,与顶部渐变橙色背景协调

附带修复:
- pages/tool/calculator-history.vue formatTime 兼容 ISO/数组/数字/旧字符串四种来源
- 解决「NaN-NaN-NaN NaN:NaN」问题(ISO 字符串里的 'T' 被替换 / 后变非法日期)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
msh-agent
2026-05-03 03:53:56 +08:00
parent 560d4de275
commit a9686c7d45
5 changed files with 66 additions and 9 deletions

View File

@@ -209,6 +209,20 @@
</template>
</el-table-column>
<el-table-column prop="groupName" label="分组" min-width="100" v-if="checkedCities.includes('分组')" />
<el-table-column label="用户标签" min-width="160" v-if="checkedCities.includes('用户标签')">
<template slot-scope="scope">
<template v-if="scope.row.tagName">
<el-tag
v-for="(tag, idx) in String(scope.row.tagName).split(',').filter(Boolean)"
:key="idx"
size="mini"
effect="plain"
style="margin-right: 4px; margin-bottom: 2px;"
>{{ tag }}</el-tag>
</template>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="spreadNickname" label="推荐人" min-width="130" v-if="checkedCities.includes('推荐人')" />
<el-table-column label="手机号" min-width="100" v-if="checkedCities.includes('手机号')">
<template slot-scope="scope">
@@ -500,8 +514,8 @@ export default {
idKey: 'uid',
card_select_show: false,
checkAll: false,
checkedCities: ['ID', '头像', '姓名', '用户等级', '分组', '推荐人', '手机号', '余额', '积分'],
columnData: ['ID', '头像', '姓名', '用户等级', '分组', '推荐人', '手机号', '余额', '积分'],
checkedCities: ['ID', '头像', '姓名', '用户等级', '分组', '用户标签', '推荐人', '手机号', '余额', '积分'],
columnData: ['ID', '头像', '姓名', '用户等级', '分组', '用户标签', '推荐人', '手机号', '余额', '积分'],
isIndeterminate: true,
};
},