refactor(admin): 用户单元格只保留平台标识

机型与系统版本号属于多余信息,Android/iOS 加游客标签已足够区分。
This commit is contained in:
Vicky authored and trae-solo-agent committed 2026-10-27 14:00:07 +08:00
1 parent 9ea22d5951
commit c89c5668e1
2 files changed
+7 -16

No files matched your search

+1 -3
View File
@@ -26,10 +26,8 @@ export interface EngagementItem {
uid: string | null
nickname: string | null
deviceId: string | null
/** 客户端系统,来自设备画像;老客户端未上报时为空。 */
/** 客户端平台 ANDROID / IOS / WEB;老客户端未上报时为空。 */
platform: string | null
osVersion: string | null
deviceModel: string | null
anonymous: boolean
dramaId: string | null
dramaTitle: string | null
+6 -13
View File
@@ -7,7 +7,7 @@ import { computed } from 'vue'
* 后台各列表共用的「用户」单元格。
*
* 口径:已登录显示昵称 + uid;未登录显示「游客」标签 + deviceId(单行省略,悬浮看全值)。
* 第二行统一展示客户端系统,系统缺失(老客户端没上报)时显示横线。
* 第二行只展示客户端平台(Android / iOS),老客户端没上报时显示横线。
*/
const props = defineProps({
row: { type: Object, required: true }
@@ -17,13 +17,9 @@ const PLATFORM_TEXT = { ANDROID: 'Android', IOS: 'iOS', WEB: 'Web' }
const isGuest = computed(() => props.row?.userId == null)
const systemText = computed(() => {
const row = props.row || {}
const name = PLATFORM_TEXT[row.platform] || row.platform || ''
const version = row.osVersion || ''
const text = `${name} ${version}`.trim()
if (!text) return '—'
return row.deviceModel ? `${text} · ${row.deviceModel}` : text
const platformText = computed(() => {
const platform = props.row?.platform || ''
return PLATFORM_TEXT[platform] || platform || '—'
})
</script>
@@ -41,7 +37,7 @@ const systemText = computed(() => {
}}</span>
<span class="app-user-uid">{{ row.uid || `用户 #${row.userId}` }}</span>
</template>
<span class="app-user-system">{{ systemText }}</span>
<span class="app-user-platform">{{ platformText }}</span>
</div>
</template>
@@ -53,11 +49,8 @@ const systemText = computed(() => {
white-space: nowrap;
}
.app-user-system {
.app-user-platform {
color: #b0adbd;
font-size: 12px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>