feat(admin): 用户与观看记录展示系统

This commit is contained in:
Zhou Weidong committed 2026-10-23 12:34:52 +08:00
1 parent c1fb6cc21c
commit 0578052d6e
4 files changed
+28 -1

No files matched your search

@@ -34,6 +34,16 @@ export function statusMeta(status) {
)
}
const PLATFORM_TEXT = { ANDROID: 'Android', IOS: 'iOS', WEB: 'Web' }
/** 登录会话上的系统,例如 Android 16。没有记录时显示横线。 */
export function systemText(row) {
const name = PLATFORM_TEXT[row?.platform] || row?.platform || ''
const version = row?.osVersion || ''
const text = `${name} ${version}`.trim()
return text || '—'
}
/** 毫秒转 mm:ss,观看流水里的进度用 */
export function formatDuration(ms) {
const total = Math.max(0, Math.floor((ms || 0) / 1000))