deploy: auto commit repo-root changes 2026-07-03 21:46:58
This commit is contained in:
@@ -54,6 +54,11 @@ export interface WorldCupLiveCardItem {
|
||||
match_id: number
|
||||
title?: string
|
||||
source_url?: string
|
||||
anchor_name?: string
|
||||
anchor_avatar?: string
|
||||
room_view_count?: number | string
|
||||
room_focus_count?: number | string
|
||||
room_notice?: string
|
||||
play_url: string
|
||||
default_play_url?: string
|
||||
stream_options?: MatchLiveStreamOption[]
|
||||
|
||||
@@ -48,7 +48,19 @@
|
||||
</view>
|
||||
|
||||
<view class="worldcup-live-card__meta">
|
||||
<text>{{ matchMetaText(live, 0) }}</text>
|
||||
<view class="worldcup-live-card__anchor">
|
||||
<image v-if="liveAnchorAvatar(live)" class="worldcup-live-card__avatar"
|
||||
:src="liveAnchorAvatar(live)" mode="aspectFill" />
|
||||
<view v-else class="worldcup-live-card__avatar worldcup-live-card__avatar--empty">
|
||||
<text>主</text>
|
||||
</view>
|
||||
<text class="worldcup-live-card__anchor-name">{{ liveAnchorName(live) }}</text>
|
||||
</view>
|
||||
<view class="worldcup-live-card__stats">
|
||||
<text class="worldcup-live-card__stat">观看 {{ formatLiveCount(live.room_view_count) }}</text>
|
||||
<text class="worldcup-live-card__stat">关注 {{ formatLiveCount(live.room_focus_count) }}</text>
|
||||
</view>
|
||||
<text class="worldcup-live-card__notice">公告 {{ liveRoomNotice(live) }}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -425,6 +437,27 @@ const liveLineTitle = (live: WorldCupLiveCardItem) => {
|
||||
return normalizeLiveText(live.title) || '直播线路'
|
||||
}
|
||||
|
||||
const liveAnchorAvatar = (live: WorldCupLiveCardItem) => {
|
||||
return normalizeLiveText(live.anchor_avatar)
|
||||
}
|
||||
|
||||
const liveAnchorName = (live: WorldCupLiveCardItem) => {
|
||||
return normalizeLiveText(live.anchor_name) || '主播'
|
||||
}
|
||||
|
||||
const liveRoomNotice = (live: WorldCupLiveCardItem) => {
|
||||
return normalizeLiveText(live.room_notice) || '暂无公告'
|
||||
}
|
||||
|
||||
const formatLiveCount = (value: unknown) => {
|
||||
const count = Number(value || 0)
|
||||
if (!Number.isFinite(count) || count <= 0) return '0'
|
||||
if (count >= 10000) {
|
||||
return `${(count / 10000).toFixed(count >= 100000 ? 0 : 1).replace(/\.0$/, '')}万`
|
||||
}
|
||||
return String(Math.floor(count))
|
||||
}
|
||||
|
||||
const buildWorldCupLiveVideoId = (live: WorldCupLiveCardItem) => {
|
||||
return `worldcup-live-${live.live_id || live.id || 0}`
|
||||
}
|
||||
@@ -1020,8 +1053,7 @@ onMounted(() => {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.worldcup-live-card__top,
|
||||
.worldcup-live-card__meta {
|
||||
.worldcup-live-card__top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@@ -1042,12 +1074,75 @@ onMounted(() => {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.worldcup-live-card__count,
|
||||
.worldcup-live-card__meta {
|
||||
.worldcup-live-card__count {
|
||||
font-size: 22rpx;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.worldcup-live-card__meta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 8rpx;
|
||||
min-width: 0;
|
||||
font-size: 22rpx;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.worldcup-live-card__anchor,
|
||||
.worldcup-live-card__stats {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.worldcup-live-card__anchor {
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.worldcup-live-card__avatar {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
background: #e2e8f0;
|
||||
}
|
||||
|
||||
.worldcup-live-card__avatar--empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #64748b;
|
||||
font-size: 18rpx;
|
||||
}
|
||||
|
||||
.worldcup-live-card__anchor-name {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #334155;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.worldcup-live-card__stats {
|
||||
flex-wrap: wrap;
|
||||
gap: 8rpx 12rpx;
|
||||
}
|
||||
|
||||
.worldcup-live-card__stat {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.worldcup-live-card__notice {
|
||||
display: block;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.worldcup-live-card__teams {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user