fix: align uniapp live stream metadata fields

This commit is contained in:
hajimi
2026-06-21 12:57:27 +08:00
parent 5f2e2e6c00
commit c59b7ade29
4 changed files with 89 additions and 31 deletions
+12 -2
View File
@@ -514,6 +514,16 @@ const awaySubs = computed(() => lineupList.value.filter((p: any) => p.team_side
const normalizeLiveText = (value: unknown) => String(value || '').trim()
const getLiveFetchStatusText = (value: unknown) => {
const text = normalizeLiveText(value)
if (!text) return ''
const normalized = text.toLowerCase()
if (normalized === 'success' || normalized === '1') return '已抓取'
if (normalized === 'pending' || normalized === '0') return '待抓取'
if (normalized === 'failed' || normalized === '-1') return '抓取失败'
return text
}
const getLiveLineTitle = (item: MatchLiveLineItem) => {
return (
normalizeLiveText(item?.title) ||
@@ -541,8 +551,8 @@ const formatLiveLineUpdate = (value: unknown) => {
const getLiveLineMeta = (item: MatchLiveLineItem) => {
const parts = [
normalizeLiveText(item?.status_text) || normalizeLiveText(item?.status_desc) || normalizeLiveText(item?.status),
formatLiveLineUpdate(item?.updated_at || item?.update_time),
getLiveFetchStatusText(item?.fetch_status),
formatLiveLineUpdate(item?.last_fetch_at || item?.update_time),
].filter(Boolean)
return parts.length ? parts.join(' · ') : '点击选择直播线路'
}