feat: 重构核心租住流程页面与交互体验
统一注册、看房、申请与入住等核心页面的视觉和流程衔接,补齐支付、签约与状态流转闭环,提升移动端操作连贯性。
This commit is contained in:
@@ -1,71 +1,66 @@
|
||||
<template>
|
||||
<view class="store-detail-page">
|
||||
<!-- 底层:全屏轮播背景 -->
|
||||
<view class="fullscreen-bg">
|
||||
<swiper
|
||||
v-if="storeGalleryList.length"
|
||||
class="bg-swiper"
|
||||
circular
|
||||
autoplay
|
||||
:interval="5000"
|
||||
:duration="1000"
|
||||
@change="onHeroSwiperChange"
|
||||
>
|
||||
<swiper-item v-for="(image, index) in storeGalleryList" :key="`${image}-${index}`">
|
||||
<image class="bg-image" :src="image" mode="aspectFill"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view v-else class="bg-empty tn-flex tn-flex-col-center tn-flex-row-center">{{ $tr('暂无图片') }}</view>
|
||||
<!-- 渐变暗化遮罩,确保上层文字卡片清晰 -->
|
||||
<view class="bg-mask"></view>
|
||||
</view>
|
||||
|
||||
<!-- 顶部导航栏 -->
|
||||
<!-- 顶部导航栏:滚动前透明/白色元素,滚动后白底深海蓝标题 -->
|
||||
<tn-nav-bar
|
||||
:isBack="true"
|
||||
:bottomShadow="false"
|
||||
backgroundColor="transparent"
|
||||
:backgroundColor="navBarBackgroundColor"
|
||||
:customBackStyle="navBarBackStyle"
|
||||
backIconColor="#FFFFFF"
|
||||
:backIconColor="navBarIconColor"
|
||||
:fixed="true"
|
||||
class="transparent-nav-bar"
|
||||
class="glass-nav-bar"
|
||||
>
|
||||
<view class="nav-title" :style="{ opacity: navTitleOpacity }">{{ displayStoreName }}</view>
|
||||
<view class="nav-title" :style="{ opacity: navTitleOpacity, color: navTitleColor }">{{ displayStoreName }}</view>
|
||||
</tn-nav-bar>
|
||||
|
||||
<!-- 上层:透明可滚动内容区 -->
|
||||
<scroll-view
|
||||
class="content-scroll"
|
||||
scroll-y
|
||||
:show-scrollbar="false"
|
||||
@scroll="handleScroll"
|
||||
enable-back-to-top
|
||||
>
|
||||
<view class="scroll-inner">
|
||||
<!-- 留出足够的顶部空间,让背景图展示出来 -->
|
||||
<view class="hero-space tn-flex tn-flex-direction-column tn-flex-col-bottom">
|
||||
<!-- 照片计数器移到店名上方,避免与导航栏重叠 -->
|
||||
<view v-if="storeGalleryList.length > 1" class="hero-counter tn-flex tn-flex-col-center">
|
||||
<text class="tn-icon-image counter-icon"></text>
|
||||
<text>{{ currentImageIndex + 1 }} / {{ storeGalleryList.length }}</text>
|
||||
</view>
|
||||
|
||||
<view class="store-title-wrap">
|
||||
<view class="store-title">{{ displayStoreName }}</view>
|
||||
<view v-if="storeTags.length" class="store-tags tn-flex tn-flex-wrap">
|
||||
<view class="tag-item" v-for="(tag, index) in storeTags" :key="index">{{ tag }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 可滚动内容区 -->
|
||||
<scroll-view
|
||||
class="content-scroll"
|
||||
scroll-y
|
||||
:show-scrollbar="false"
|
||||
@scroll="handleScroll"
|
||||
enable-back-to-top
|
||||
>
|
||||
<view class="scroll-inner">
|
||||
<!-- Hero 大图区 -->
|
||||
<view class="hero-panel">
|
||||
<swiper
|
||||
v-if="storeGalleryList.length"
|
||||
class="hero-swiper"
|
||||
circular
|
||||
autoplay
|
||||
:interval="5000"
|
||||
:duration="1000"
|
||||
@change="onHeroSwiperChange"
|
||||
>
|
||||
<swiper-item v-for="(image, index) in storeGalleryList" :key="`${image}-${index}`">
|
||||
<image class="hero-image" :src="image" mode="aspectFill"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view v-else class="hero-empty tn-flex tn-flex-col-center tn-flex-row-center">{{ $tr('暂无图片') }}</view>
|
||||
<view v-if="storeGalleryList.length > 1" class="hero-counter">
|
||||
<text class="tn-icon-image counter-icon"></text>
|
||||
<text>{{ currentImageIndex + 1 }} / {{ storeGalleryList.length }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 悬浮毛玻璃信息流 -->
|
||||
<view class="floating-content-wrap">
|
||||
<!-- 店名主卡片 -->
|
||||
<view class="store-title-card">
|
||||
<view class="store-title">{{ displayStoreName }}</view>
|
||||
<view class="title-divider"></view>
|
||||
<view v-if="storeTags.length" class="store-tags tn-flex tn-flex-wrap">
|
||||
<view class="tag-item" v-for="(tag, index) in storeTags" :key="index">{{ tag }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 信息流 -->
|
||||
<view class="content-body">
|
||||
<store-info
|
||||
:storeData="storeData"
|
||||
:language="language"
|
||||
@open-map="openMap"
|
||||
/>
|
||||
|
||||
|
||||
<facility-list
|
||||
:facilityList="facilityList"
|
||||
:language="language"
|
||||
@@ -77,20 +72,20 @@
|
||||
:language="language"
|
||||
@go-detail="goToRoomDetail"
|
||||
/>
|
||||
|
||||
|
||||
<view class="bottom-spacer"></view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 悬浮操作栏 (固定在底部,透明风格) -->
|
||||
<!-- 底部操作栏 -->
|
||||
<view class="action-bar-wrap tn-safe-area-inset-bottom">
|
||||
<view class="action-bar">
|
||||
<button class="action-btn action-btn--glass" open-type="share">
|
||||
<button class="action-btn action-btn--secondary" open-type="share">
|
||||
<text class="tn-icon-share action-btn__icon"></text>
|
||||
<text>{{ $tr('分享') }}</text>
|
||||
</button>
|
||||
<button class="action-btn action-btn--primary-glass" @click="handleCall">
|
||||
<button class="action-btn action-btn--primary" @click="handleCall">
|
||||
<text class="tn-icon-phone action-btn__icon"></text>
|
||||
<text>{{ contactButtonText }}</text>
|
||||
</button>
|
||||
@@ -224,24 +219,37 @@ export default {
|
||||
}
|
||||
return this.$tr('电话咨询')
|
||||
},
|
||||
navBarBackgroundColor() {
|
||||
const opacity = Math.min(Math.max((this.scrollTop - 20) / 80, 0), 1);
|
||||
return `rgba(255, 255, 255, ${opacity})`;
|
||||
},
|
||||
navBarBackStyle() {
|
||||
const isDarkBg = this.scrollTop < 100;
|
||||
const isTop = this.scrollTop < 60;
|
||||
return {
|
||||
transition: 'all 0.3s',
|
||||
background: isDarkBg ? 'rgba(0, 0, 0, 0.4)' : 'rgba(255, 255, 255, 0.15)',
|
||||
backdropFilter: 'blur(10px)',
|
||||
background: isTop ? 'rgba(255, 255, 255, 0.92)' : '#FFFFFF',
|
||||
backdropFilter: 'blur(12rpx)',
|
||||
WebkitBackdropFilter: 'blur(12rpx)',
|
||||
borderRadius: '50%',
|
||||
width: '64rpx',
|
||||
height: '64rpx',
|
||||
width: '68rpx',
|
||||
height: '68rpx',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
marginLeft: '12rpx',
|
||||
border: '1rpx solid rgba(255, 255, 255, 0.25)'
|
||||
boxShadow: isTop
|
||||
? '0 8rpx 24rpx rgba(30, 58, 95, 0.12), inset 0 1rpx 0 rgba(255, 255, 255, 0.6)'
|
||||
: '0 8rpx 20rpx rgba(15, 23, 42, 0.08)'
|
||||
};
|
||||
},
|
||||
navBarIconColor() {
|
||||
return '#1E3A5F';
|
||||
},
|
||||
navTitleColor() {
|
||||
return '#1E3A5F';
|
||||
},
|
||||
navTitleOpacity() {
|
||||
return Math.min(Math.max((this.scrollTop - 80) / 100, 0), 1);
|
||||
return Math.min(Math.max((this.scrollTop - 60) / 80, 0), 1);
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -412,9 +420,20 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
/* 品牌色变量本地化(深海蓝 + 香槟金) */
|
||||
$navy-deep: #1E3A5F;
|
||||
$navy-light: #2E4A73;
|
||||
$gold: #C9A96E;
|
||||
$gold-light: #D4BC8C;
|
||||
$bg-blue: #F0F5FF;
|
||||
$bg-page: #F8FAFF;
|
||||
$text-primary: #0F172A;
|
||||
$text-secondary: #64748B;
|
||||
$text-tertiary: #94A3B8;
|
||||
|
||||
.store-detail-page {
|
||||
height: 100vh;
|
||||
background-color: #000; /* 全屏黑色底色,防止滑动露白 */
|
||||
background: linear-gradient(180deg, $bg-blue 0%, $bg-page 25%, #FFFFFF 100%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
@@ -424,7 +443,6 @@ export default {
|
||||
.nav-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
transition: opacity 0.3s;
|
||||
max-width: 420rpx;
|
||||
overflow: hidden;
|
||||
@@ -432,40 +450,14 @@ export default {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.transparent-nav-bar ::v-deep .tn-nav-bar {
|
||||
background: transparent !important;
|
||||
.glass-nav-bar ::v-deep .tn-nav-bar {
|
||||
backdrop-filter: blur(20rpx);
|
||||
-webkit-backdrop-filter: blur(20rpx);
|
||||
box-shadow: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/* 底层背景 */
|
||||
.fullscreen-bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.bg-swiper, .bg-image, .bg-empty {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.bg-empty {
|
||||
background: #111;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
.bg-mask {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.85) 100%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* 上层滚动内容区 */
|
||||
/* 可滚动内容区 */
|
||||
.content-scroll {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
@@ -482,28 +474,48 @@ export default {
|
||||
|
||||
.scroll-inner {
|
||||
min-height: 101%;
|
||||
padding-top: calc(100rpx + env(safe-area-inset-top));
|
||||
}
|
||||
|
||||
/* 留出背景展示区 */
|
||||
.hero-space {
|
||||
/* Hero 大图区 */
|
||||
.hero-panel {
|
||||
position: relative;
|
||||
height: 460rpx;
|
||||
margin: 0 32rpx;
|
||||
border-radius: 32rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 20rpx 60rpx rgba(30, 58, 95, 0.16);
|
||||
background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E1 100%);
|
||||
}
|
||||
|
||||
.hero-swiper,
|
||||
.hero-image,
|
||||
.hero-empty {
|
||||
width: 100%;
|
||||
height: 35vh; /* 进一步降低留白高度,确保底部房型列表至少透出一条数据 */
|
||||
padding: 0 32rpx 40rpx;
|
||||
justify-content: flex-end; /* 内容沉底 */
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.hero-empty {
|
||||
color: $text-tertiary;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.hero-counter {
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
bottom: 24rpx;
|
||||
height: 52rpx;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 999rpx;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
background: rgba($navy-deep, 0.85);
|
||||
backdrop-filter: blur(14px);
|
||||
color: #ffffff;
|
||||
color: $gold-light;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
border: 1rpx solid rgba(255, 255, 255, 0.2);
|
||||
margin-bottom: 24rpx;
|
||||
align-self: flex-end; /* 靠右对齐 */
|
||||
font-weight: 600;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 8rpx 24rpx rgba(30, 58, 95, 0.2);
|
||||
}
|
||||
|
||||
.counter-icon {
|
||||
@@ -511,59 +523,72 @@ export default {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.store-title-wrap {
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
/* 店名主卡片 */
|
||||
.store-title-card {
|
||||
position: relative;
|
||||
margin: -60rpx 32rpx 0;
|
||||
padding: 40rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 32rpx;
|
||||
box-shadow: 0 12rpx 40rpx rgba(30, 58, 95, 0.08);
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.store-title {
|
||||
font-size: 64rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 24rpx;
|
||||
text-shadow: 0 4rpx 16rpx rgba(0,0,0,0.6);
|
||||
font-size: 48rpx;
|
||||
font-weight: 800;
|
||||
color: $navy-deep;
|
||||
line-height: 1.3;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.title-divider {
|
||||
width: 48rpx;
|
||||
height: 4rpx;
|
||||
margin: 24rpx 0;
|
||||
background: linear-gradient(90deg, $gold 0%, $gold-light 100%);
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
|
||||
.store-tags {
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.tag-item {
|
||||
font-size: 24rpx;
|
||||
padding: 8rpx 20rpx;
|
||||
border-radius: 8rpx;
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 1rpx solid rgba(255, 255, 255, 0.2);
|
||||
color: #fff;
|
||||
text-shadow: 0 2rpx 4rpx rgba(0,0,0,0.3);
|
||||
padding: 8rpx 18rpx;
|
||||
border-radius: 999rpx;
|
||||
background: rgba($navy-deep, 0.06);
|
||||
border: 1rpx solid rgba($navy-deep, 0.12);
|
||||
color: $navy-deep;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 悬浮毛玻璃信息流 */
|
||||
.floating-content-wrap {
|
||||
position: relative;
|
||||
padding-bottom: 180rpx;
|
||||
/* 信息流 */
|
||||
.content-body {
|
||||
padding: 24rpx 0 0;
|
||||
}
|
||||
|
||||
/* 底部操作栏 - 毛玻璃悬浮 */
|
||||
/* 底部操作栏 */
|
||||
.action-bar-wrap {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 18rpx 32rpx calc(18rpx + env(safe-area-inset-bottom));
|
||||
background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(24rpx);
|
||||
-webkit-backdrop-filter: blur(24rpx);
|
||||
box-shadow: 0 -8rpx 30rpx rgba(30, 58, 95, 0.06);
|
||||
z-index: 100;
|
||||
pointer-events: none; /* 让渐变层不阻挡点击 */
|
||||
}
|
||||
|
||||
.action-bar {
|
||||
display: flex;
|
||||
gap: 24rpx;
|
||||
pointer-events: auto; /* 恢复按钮区域点击 */
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
@@ -573,35 +598,41 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
font-weight: 700;
|
||||
padding: 0;
|
||||
border: 1rpx solid rgba(255, 255, 255, 0.3);
|
||||
line-height: 1;
|
||||
backdrop-filter: blur(16px);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
button.action-btn::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.action-btn:active {
|
||||
transform: scale(0.97);
|
||||
}
|
||||
|
||||
.action-btn__icon {
|
||||
margin-right: 12rpx;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.action-btn--glass {
|
||||
.action-btn--secondary {
|
||||
flex: 0 0 200rpx;
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
color: #fff;
|
||||
background: rgba($navy-deep, 0.06);
|
||||
color: $navy-deep;
|
||||
border: 1rpx solid rgba($navy-deep, 0.12);
|
||||
}
|
||||
|
||||
.action-btn--primary-glass {
|
||||
.action-btn--primary {
|
||||
flex: 1;
|
||||
background: rgba($brand-primary, 0.85);
|
||||
color: #fff;
|
||||
border-color: rgba($brand-primary, 0.5);
|
||||
box-shadow: 0 12rpx 32rpx rgba($brand-primary, 0.3);
|
||||
background: linear-gradient(135deg, $navy-light 0%, $navy-deep 100%);
|
||||
color: #FFFFFF;
|
||||
box-shadow: 0 12rpx 32rpx rgba($navy-deep, 0.25);
|
||||
}
|
||||
|
||||
.action-btn--primary .action-btn__icon {
|
||||
color: $gold-light;
|
||||
}
|
||||
|
||||
.bottom-spacer {
|
||||
|
||||
Reference in New Issue
Block a user