feat: 场馆选择页改为全屏黑白双栏布局
- venue-select: 整个屏幕左右平分,左深色(综合场馆)右浅色(冰场馆) - venue-select: 移除导航栏、边框、描述文字 - venue.js: 综合场馆排第一,首次进入默认comprehensive - VenueSwitchHeader: 简化为场馆名+箭头单行卡片
This commit is contained in:
@@ -1,32 +1,13 @@
|
||||
<template>
|
||||
<view v-if="isReady" class="venue-select-page">
|
||||
<view class="header">
|
||||
<text class="title">选择场馆</text>
|
||||
<text class="subtitle">进入对应场馆后,会员、预约、订单和支付数据彼此独立。</text>
|
||||
</view>
|
||||
|
||||
<view v-if="selectedVenue" class="current-card">
|
||||
<text class="current-label">当前场馆</text>
|
||||
<text class="current-name">{{ selectedVenue.name }}</text>
|
||||
<button class="primary-button continue-btn" @tap="continueCurrentVenue">继续进入</button>
|
||||
</view>
|
||||
|
||||
<view class="venue-list">
|
||||
<view
|
||||
v-for="venue in venues"
|
||||
:key="venue.key"
|
||||
class="venue-card"
|
||||
:class="{ active: venue.key === currentVenue }"
|
||||
@tap="selectVenue(venue.key)"
|
||||
>
|
||||
<view class="venue-main">
|
||||
<text class="venue-name">{{ venue.name }}</text>
|
||||
<text class="venue-desc">{{ venue.description }}</text>
|
||||
</view>
|
||||
<view class="venue-action">
|
||||
<text>{{ venue.key === currentVenue ? '切换进入' : '进入' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<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>
|
||||
@@ -41,7 +22,6 @@ const venueStore = useVenueStore()
|
||||
const venues = VENUE_OPTIONS
|
||||
const isReady = ref(false)
|
||||
const currentVenue = computed(() => venueStore.currentVenue)
|
||||
const selectedVenue = computed(() => venueStore.currentVenueOption)
|
||||
|
||||
onLoad((options) => {
|
||||
const storedVenue = venueStore.init()
|
||||
@@ -58,122 +38,43 @@ onLoad((options) => {
|
||||
const selectVenue = (venueKey) => {
|
||||
venueStore.enterVenue(venueKey)
|
||||
}
|
||||
|
||||
const continueCurrentVenue = () => {
|
||||
if (!venueStore.currentVenue) return
|
||||
venueStore.enterVenue(venueStore.currentVenue)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.venue-select-page {
|
||||
min-height: 100vh;
|
||||
padding: 96rpx 32rpx 48rpx;
|
||||
background: $bg-color-soft;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18rpx;
|
||||
margin-bottom: 56rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: $text-color-main;
|
||||
font-size: 48rpx;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
color: $text-color-muted;
|
||||
font-size: 26rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.venue-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24rpx;
|
||||
}
|
||||
|
||||
.current-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12rpx;
|
||||
margin-bottom: 32rpx;
|
||||
padding: 28rpx;
|
||||
border-radius: $border-radius-lg;
|
||||
background: $bg-color-main;
|
||||
border: 1rpx solid $border-color;
|
||||
}
|
||||
|
||||
.current-label {
|
||||
color: $text-color-muted;
|
||||
font-size: 22rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.current-name {
|
||||
color: $text-color-main;
|
||||
font-size: 32rpx;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.continue-btn {
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.venue-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 24rpx;
|
||||
padding: 32rpx;
|
||||
border: 1rpx solid $border-color;
|
||||
border-radius: $border-radius-lg;
|
||||
background: $bg-color-main;
|
||||
}
|
||||
|
||||
.venue-card.active {
|
||||
border-color: $color-primary;
|
||||
background: $color-primary-light;
|
||||
}
|
||||
|
||||
.venue-main {
|
||||
display: flex;
|
||||
.venue-half {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
flex-direction: column;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.venue-name {
|
||||
color: $text-color-main;
|
||||
font-size: 34rpx;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.venue-desc {
|
||||
color: $text-color-muted;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.venue-action {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 96rpx;
|
||||
height: 56rpx;
|
||||
border-radius: $border-radius-sm;
|
||||
background: $text-color-main;
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.venue-card.active .venue-action {
|
||||
background: $color-primary;
|
||||
.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>
|
||||
|
||||
Reference in New Issue
Block a user