deploy: auto commit repo-root changes 2026-07-10 10:47:39
This commit is contained in:
@@ -18,6 +18,12 @@
|
||||
<u-icon name="arrow-right" size="26" color="#ffffff"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="topic-tabs">
|
||||
<view v-for="tab in worldCupQuickTabs" :key="tab.key" class="topic-tabs__item"
|
||||
@tap="openWorldCupCenter(tab.key)">
|
||||
<text>{{ tab.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x class="match-header__tabs">
|
||||
<view class="match-header__tabs-inner">
|
||||
<view v-for="(tab, idx) in sportTabs" :key="idx" class="match-tab"
|
||||
@@ -87,13 +93,20 @@ import MatchCard from '@/components/match-card/match-card.vue'
|
||||
import { getMatchList, getMatchLeagues, getSportTypes } from '@/api/match'
|
||||
import { getArticleCate } from '@/api/news'
|
||||
|
||||
type WorldCupQuickTab = 'schedule' | 'live' | 'odds'
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'open-worldcup', payload: { tab: 'schedule'; cid?: number | null }): void
|
||||
(e: 'open-worldcup', payload: { tab: WorldCupQuickTab; cid?: number | null }): void
|
||||
}>()
|
||||
|
||||
const statusBarHeight = ref(0)
|
||||
const sportTabs = ref<any[]>([])
|
||||
const worldCupCateId = ref<number | null>(null)
|
||||
const worldCupQuickTabs: { key: WorldCupQuickTab; label: string }[] = [
|
||||
{ key: 'schedule', label: '赛程' },
|
||||
{ key: 'live', label: '直播' },
|
||||
{ key: 'odds', label: '赔率' }
|
||||
]
|
||||
const currentSport = ref(0)
|
||||
const currentLeague = ref('')
|
||||
const allLeagues = ref<Record<number, any[]>>({})
|
||||
@@ -256,9 +269,9 @@ const goDetail = (item: any) => {
|
||||
uni.navigateTo({ url: `/pages/match_detail/match_detail?id=${id}` })
|
||||
}
|
||||
|
||||
const openWorldCupCenter = async () => {
|
||||
const openWorldCupCenter = async (tab: WorldCupQuickTab = 'schedule') => {
|
||||
const cid = await fetchWorldCupCateId()
|
||||
emit('open-worldcup', { tab: 'schedule', cid })
|
||||
emit('open-worldcup', { tab, cid })
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
@@ -327,7 +340,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.topic-entry {
|
||||
margin: 0 24rpx 16rpx;
|
||||
margin: 0 24rpx 12rpx;
|
||||
padding: 18rpx 18rpx 18rpx 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -394,6 +407,27 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
|
||||
.topic-tabs {
|
||||
margin: 0 24rpx 16rpx;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 12rpx;
|
||||
|
||||
&__item {
|
||||
height: 58rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #f1f5ff;
|
||||
color: #185dff;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
line-height: 58rpx;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.league-tab {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user