Files
venue-miniapp/miniprogram/src/pages/venue-select/index.vue
T
gqt 0582a5f6a8 feat: 场馆选择页改为全屏黑白双栏布局
- venue-select: 整个屏幕左右平分,左深色(综合场馆)右浅色(冰场馆)
- venue-select: 移除导航栏、边框、描述文字
- venue.js: 综合场馆排第一,首次进入默认comprehensive
- VenueSwitchHeader: 简化为场馆名+箭头单行卡片
2026-07-13 21:53:55 +08:00

81 lines
1.5 KiB
Vue

<template>
<view v-if="isReady" class="venue-select-page">
<view
v-for="venue in venues"
:key="venue.key"
class="venue-half"
:class="venue.key === 'comprehensive' ? 'dark' : 'light'"
@tap="selectVenue(venue.key)"
>
<text class="venue-name">{{ venue.name }}</text>
</view>
</view>
</template>
<script setup>
import { computed, ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { useVenueStore } from '@/stores/venue'
import { VENUE_OPTIONS, navigateToVenueHome } from '@/utils/venue'
const venueStore = useVenueStore()
const venues = VENUE_OPTIONS
const isReady = ref(false)
const currentVenue = computed(() => venueStore.currentVenue)
onLoad((options) => {
const storedVenue = venueStore.init()
const isSwitchMode = options?.mode === 'switch'
if (storedVenue && !isSwitchMode) {
navigateToVenueHome(storedVenue)
return
}
isReady.value = true
})
const selectVenue = (venueKey) => {
venueStore.enterVenue(venueKey)
}
</script>
<style lang="scss" scoped>
.venue-select-page {
min-height: 100vh;
display: flex;
}
.venue-half {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
.venue-half:active {
opacity: 0.9;
}
.venue-half.dark {
background: #0F172A;
}
.venue-half.dark .venue-name {
color: #FFFFFF;
}
.venue-half.light {
background: #F8FAFC;
}
.venue-half.light .venue-name {
color: #0F172A;
}
.venue-name {
font-size: 40rpx;
font-weight: 900;
}
</style>