<template>
|
<view class="storage-page">
|
<view class="top-fixed">
|
<view class="search-row">
|
<view class="search-box">
|
<image src="/static/icon/ic_search2@2x.png" mode="widthFix"></image>
|
<input
|
v-model="keyword"
|
class="search-input"
|
type="text"
|
placeholder="搜索寄存点名称或地址"
|
placeholder-class="search-placeholder"
|
/>
|
</view>
|
<view class="map-entry" @tap="toggleViewMode">
|
<view class="map-icon">
|
<image src="/static/icon/ic_list@2x.png" mode="widthFix" v-if="isMapMode"></image>
|
<image src="/static/icon/ic_map@2x.png" mode="widthFix" v-else></image>
|
</view>
|
<text class="map-text">{{ isMapMode ? '列表' : '地图' }}</text>
|
</view>
|
</view>
|
|
<view class="filter-row" style="height: 88rpx; padding: 0 30rpx; box-sizing: border-box; border-bottom: 1rpx solid #E5E5E5; justify-content: space-around;">
|
<view
|
v-for="item in filters"
|
:key="item.label"
|
class="filter-item"
|
:class="{ active: currentDropdown === item.key }"
|
@tap="toggleDropdown(item.key)"
|
>
|
<text>{{ filterLabels[item.key] }}</text>
|
<image :src="currentDropdown === item.key ? '/static/icon/ar_open_sel@2x.png' : '/static/icon/ar_open1@2x.png'" mode="widthFix"></image>
|
</view>
|
</view>
|
|
<view v-if="currentDropdown" class="dropdown-panel">
|
<view
|
v-for="option in currentOptions"
|
:key="option.value"
|
class="dropdown-option"
|
:class="{ active: selectedFilters[currentDropdown] === option.value }"
|
@tap="selectDropdownOption(option)"
|
>
|
<text>{{ option.label }}</text>
|
<u-icon v-if="selectedFilters[currentDropdown] === option.value" name="checkmark" size="24" color="#2F86F6"></u-icon>
|
</view>
|
</view>
|
</view>
|
|
<view v-if="currentDropdown" class="dropdown-mask" @tap="closeDropdown"></view>
|
|
<view class="content-wrap">
|
<view v-if="!isMapMode" class="card-list">
|
<view v-for="item in pointList" :key="item.name + item.distance" class="point-card">
|
<view class="thumb" :class="item.thumbClass">
|
<image src="/static/icon/nav_wode_sel@2x.png" mode="widthFix"></image>
|
</view>
|
<view class="point-main">
|
<view class="point-head">
|
<text class="point-name">{{ item.name }}</text>
|
<text class="point-distance">{{ item.distance }}</text>
|
</view>
|
<view class="point-address">
|
<image src="/static/icon/home_ic_location3@2x.png" mode="widthFix"></image>
|
<text>{{ item.address }}</text>
|
</view>
|
<text class="point-time">{{ item.time }}</text>
|
</view>
|
</view>
|
</view>
|
|
<view v-else class="map-panel">
|
<map
|
id="storageMap"
|
class="store-map"
|
:latitude="mapCenter.latitude"
|
:longitude="mapCenter.longitude"
|
:scale="14"
|
:markers="mapMarkers"
|
:show-location="true"
|
:enable-rotate="false"
|
:enable-overlooking="false"
|
:enable-poi="true"
|
@markertap="handleMarkerTap"
|
@callouttap="handleMarkerTap"
|
@tap="closeStorePopup"
|
></map>
|
<view class="location-btn" @tap="resetMapCenter">
|
<u-icon name="map-fill" size="28" color="#333333"></u-icon>
|
</view>
|
<view v-if="activeStore" class="store-popup-mask" @tap="closeStorePopup"></view>
|
<view v-if="activeStore" class="store-popup">
|
<scroll-view scroll-y class="popup-scroll">
|
<view class="popup-close" @tap="closeStorePopup">
|
<u-icon name="close" size="26" color="#8C939F"></u-icon>
|
</view>
|
<image class="popup-banner" src="/static/icon/nav_wode_sel@2x.png" mode="aspectFill"></image>
|
<view class="popup-body">
|
<text class="popup-title">{{ activeStore.name }}</text>
|
<text class="popup-hours">{{ activeStore.time }}</text>
|
<text class="popup-desc">在合肥旅行,无论你是想在老城区的街头巷尾深度 Citywalk,还是赶高铁前挤出时间打卡天鹅湖夜景,遍布全城的行李寄存点都能让你彻底解放双手。</text>
|
<view class="popup-address-row">
|
<view class="popup-address">
|
<image src="/static/icon/home_ic_location3@2x.png" mode="aspectFit"></image>
|
<text>{{ activeStore.address }}</text>
|
</view>
|
<view class="popup-distance-wrap">
|
<image src="/static/icon/ic_address@2x.png" mode="aspectFit"></image>
|
<text>{{ activeStore.distance }}</text>
|
</view>
|
</view>
|
<view class="popup-gap"></view>
|
<view class="popup-section">
|
<text class="popup-section-title">寄存类型</text>
|
<text class="popup-section-text">行李箱(28寸/24寸等)</text>
|
<text class="popup-section-text">背包/手提包</text>
|
<text class="popup-section-text">大件行李、滑雪板、自行车等</text>
|
</view>
|
<view class="popup-gap"></view>
|
<view class="popup-section no-border">
|
<text class="popup-section-title">收费标准</text>
|
<text class="popup-section-text">大件行李箱(30-32寸):</text>
|
<text class="popup-section-text">寄存模式:35元/每天</text>
|
<text class="popup-section-text">寄送模式:起步价里10元,每多2公里增加5元</text>
|
</view>
|
</view>
|
</scroll-view>
|
<view class="popup-footer">
|
<view class="popup-btn ghost" @tap="contactStore">联系门店</view>
|
<view class="popup-btn primary" @tap="storeLuggage">行李寄存</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
keyword: '',
|
isMapMode: false,
|
activeStore: null,
|
currentDropdown: '',
|
selectedFilters: {
|
sort: 'all',
|
range: 'all',
|
hours: 'all'
|
},
|
mapCenter: {
|
latitude: 31.86119,
|
longitude: 117.28565
|
},
|
filters: [
|
{ key: 'sort', label: '综合排序' },
|
{ key: 'range', label: '位置范围' },
|
{ key: 'hours', label: '营业时间' }
|
],
|
dropdownOptions: {
|
sort: [
|
{ label: '综合排序', value: 'all' },
|
{ label: '距离最近', value: 'nearest' },
|
{ label: '评分优先', value: 'score' }
|
],
|
range: [
|
{ label: '位置范围', value: 'all' },
|
{ label: '1km内', value: '1km' },
|
{ label: '3km内', value: '3km' },
|
{ label: '5km内', value: '5km' }
|
],
|
hours: [
|
{ label: '营业时间', value: 'all' },
|
{ label: '营业中', value: 'open' },
|
{ label: '24小时营业', value: '24h' }
|
]
|
},
|
pointList: [
|
{
|
name: '中铁快运南站旗舰店',
|
address: '合肥南站负一层100号',
|
time: '周一至周日 7:00~23:00',
|
distance: '239m',
|
cover: '/static/icon/nav_wode_sel@2x.png',
|
latitude: 31.80054,
|
longitude: 117.28391,
|
thumbClass: 'thumb-amber'
|
},
|
{
|
name: '中铁快运合肥火车站',
|
address: '合肥火车站一层12号',
|
time: '周一至周日 7:00~23:00',
|
distance: '12.8km',
|
cover: '/static/icon/nav_wode_sel@2x.png',
|
latitude: 31.87673,
|
longitude: 117.31584,
|
thumbClass: 'thumb-sky'
|
},
|
{
|
name: '合肥火车站北广场',
|
address: '合肥火车站一层12号',
|
time: '周一至周日 7:00~23:00',
|
distance: '13.1km',
|
cover: '/static/icon/nav_wode_sel@2x.png',
|
latitude: 31.87802,
|
longitude: 117.31695,
|
thumbClass: 'thumb-stone'
|
},
|
{
|
name: '小铁无忧存',
|
address: '合肥火车站一层12号',
|
time: '周一至周日 7:00~23:00',
|
distance: '16.3km',
|
cover: '/static/icon/nav_wode_sel@2x.png',
|
latitude: 31.88418,
|
longitude: 117.33086,
|
thumbClass: 'thumb-orange'
|
},
|
{
|
name: '合肥火车站北广场',
|
address: '合肥火车站一层12号',
|
time: '周一至周日 7:00~23:00',
|
distance: '21.9km',
|
cover: '/static/icon/nav_wode_sel@2x.png',
|
latitude: 31.85562,
|
longitude: 117.29231,
|
thumbClass: 'thumb-silver'
|
},
|
{
|
name: '合肥火车站北广场',
|
address: '合肥火车站一层12号',
|
time: '周一至周日 7:00~23:00',
|
distance: '24.9km',
|
cover: '/static/icon/nav_wode_sel@2x.png',
|
latitude: 31.84638,
|
longitude: 117.34752,
|
thumbClass: 'thumb-amber'
|
}
|
]
|
}
|
},
|
computed: {
|
filterLabels() {
|
return {
|
sort: this.getFilterLabel('sort'),
|
range: this.getFilterLabel('range'),
|
hours: this.getFilterLabel('hours')
|
}
|
},
|
currentOptions() {
|
return this.currentDropdown ? this.dropdownOptions[this.currentDropdown] || [] : []
|
},
|
mapMarkers() {
|
return this.pointList.map((item, index) => ({
|
id: index,
|
latitude: item.latitude,
|
longitude: item.longitude,
|
width: 28,
|
height: 36,
|
iconPath: '/static/icon/home_ic_location@2x.png',
|
anchor: {
|
x: 0.5,
|
y: 1
|
},
|
callout: {
|
content: `${item.name} ${item.distance}`,
|
display: 'ALWAYS',
|
padding: 8,
|
borderRadius: 18,
|
bgColor: '#FFFFFF',
|
color: '#4AA8FF',
|
fontSize: 12,
|
textAlign: 'center'
|
}
|
}))
|
}
|
},
|
methods: {
|
getFilterLabel(key) {
|
const options = this.dropdownOptions[key] || []
|
const current = options.find(item => item.value === this.selectedFilters[key])
|
return current ? current.label : (this.filters.find(item => item.key === key) || {}).label || ''
|
},
|
toggleDropdown(key) {
|
this.currentDropdown = this.currentDropdown === key ? '' : key
|
},
|
closeDropdown() {
|
this.currentDropdown = ''
|
},
|
closeStorePopup() {
|
this.activeStore = null
|
},
|
selectDropdownOption(option) {
|
if (!this.currentDropdown) {
|
return
|
}
|
this.$set(this.selectedFilters, this.currentDropdown, option.value)
|
this.closeDropdown()
|
},
|
toggleViewMode() {
|
this.isMapMode = !this.isMapMode
|
this.closeDropdown()
|
this.closeStorePopup()
|
if (this.isMapMode) {
|
this.resetMapCenter()
|
}
|
},
|
handleMarkerTap(event) {
|
const markerId = typeof event.detail.markerId !== 'undefined' ? event.detail.markerId : event.detail.id
|
const current = this.pointList[markerId]
|
if (!current) {
|
return
|
}
|
this.mapCenter = {
|
latitude: current.latitude,
|
longitude: current.longitude
|
}
|
this.activeStore = current
|
},
|
resetMapCenter() {
|
this.mapCenter = {
|
latitude: 31.86119,
|
longitude: 117.28565
|
}
|
},
|
contactStore() {
|
uni.showToast({
|
title: '联系门店待接入',
|
icon: 'none'
|
})
|
},
|
storeLuggage() {
|
uni.navigateTo({
|
url: '/pages/luggage-storage/luggage-storage'
|
})
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.storage-page {
|
position: relative;
|
min-height: 100vh;
|
background: #ffffff;
|
}
|
|
.top-fixed {
|
position: fixed;
|
left: 0;
|
top: 0;
|
width: 100%;
|
background: #ffffff;
|
z-index: 20;
|
}
|
|
.dropdown-mask {
|
position: fixed;
|
left: 0;
|
right: 0;
|
top: 184rpx;
|
bottom: 0;
|
background: rgba(0, 0, 0, 0.18);
|
z-index: 30;
|
}
|
|
.content-wrap {
|
padding-top: 184rpx;
|
min-height: 100vh;
|
box-sizing: border-box;
|
}
|
|
.search-row,
|
.filter-row,
|
.content-wrap {
|
position: relative;
|
z-index: 1;
|
}
|
|
.search-row {
|
display: flex;
|
align-items: center;
|
padding: 24rpx 24rpx 0;
|
gap: 18rpx;
|
}
|
|
.search-box {
|
flex: 1;
|
height: 72rpx;
|
background: #F9F9FB;
|
border-radius: 16rpx;
|
border: 1rpx solid #EEEEEE;
|
padding: 0 22rpx;
|
display: flex;
|
align-items: center;
|
gap: 14rpx;
|
image {
|
width: 32rpx;
|
height: 32rpx;
|
}
|
}
|
|
.search-input {
|
flex: 1;
|
height: 72rpx;
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #999999;
|
background: transparent;
|
}
|
|
.search-placeholder {
|
font-weight: 400;
|
font-size: 26rpx;
|
color: #999999;
|
}
|
|
.map-entry {
|
width: 70rpx;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
justify-content: center;
|
gap: 4rpx;
|
}
|
|
.map-icon {
|
width: 40rpx;
|
height: 40rpx;
|
border-radius: 12rpx;
|
background: rgba(255, 255, 255, 0.92);
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
image {
|
width: 100%;
|
height: 100%;
|
}
|
}
|
|
.map-text {
|
font-size: 22rpx;
|
line-height: 1;
|
color: #6a7485;
|
}
|
|
.filter-row {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
padding: 22rpx 30rpx 20rpx;
|
background: #ffffff;
|
}
|
|
.dropdown-panel {
|
position: absolute;
|
left: 0;
|
right: 0;
|
top: 184rpx;
|
padding: 10rpx 0 18rpx;
|
background: #ffffff;
|
box-shadow: 0 12rpx 32rpx rgba(0, 0, 0, 0.08);
|
z-index: 21;
|
}
|
|
.dropdown-option {
|
height: 76rpx;
|
padding: 0 30rpx;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
font-size: 28rpx;
|
color: #555555;
|
box-sizing: border-box;
|
}
|
|
.dropdown-option.active {
|
color: #2f86f6;
|
font-weight: 500;
|
}
|
|
.filter-item {
|
display: flex;
|
align-items: center;
|
gap: 8rpx;
|
font-weight: 400;
|
font-size: 28rpx;
|
color: #777777;
|
}
|
|
.filter-item image {
|
width: 20rpx;
|
height: 20rpx;
|
}
|
|
.filter-item.active {
|
color: #222222;
|
}
|
|
.card-list {
|
padding: 30rpx;
|
box-sizing: border-box;
|
}
|
|
.map-panel {
|
position: relative;
|
height: calc(100vh - 184rpx);
|
}
|
|
.store-map {
|
width: 100%;
|
height: 100%;
|
}
|
|
.location-btn {
|
position: absolute;
|
right: 24rpx;
|
bottom: 32rpx;
|
width: 72rpx;
|
height: 72rpx;
|
border-radius: 16rpx;
|
background: #ffffff;
|
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.12);
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
z-index: 2;
|
}
|
|
.store-popup-mask {
|
position: fixed;
|
left: 0;
|
right: 0;
|
top: 0;
|
bottom: 0;
|
background: rgba(0, 0, 0, 0.36);
|
z-index: 998;
|
}
|
|
.store-popup {
|
position: fixed;
|
left: 0;
|
right: 0;
|
bottom: 0;
|
height: 80vh;
|
background: #ffffff;
|
border-radius: 28rpx 28rpx 0 0;
|
z-index: 999;
|
overflow: hidden;
|
animation: popup-slide-up 0.25s ease-out;
|
}
|
|
.popup-scroll {
|
position: relative;
|
height: calc(80vh - 132rpx);
|
}
|
|
.popup-close {
|
position: absolute;
|
right: 24rpx;
|
top: 24rpx;
|
width: 56rpx;
|
height: 56rpx;
|
border-radius: 28rpx;
|
background: rgba(255, 255, 255, 0.92);
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
z-index: 2;
|
}
|
|
.popup-banner {
|
width: 100%;
|
height: 336rpx;
|
background: #eef2f8;
|
}
|
|
.popup-body {
|
padding: 24rpx 30rpx 0;
|
box-sizing: border-box;
|
padding-bottom: 32rpx;
|
}
|
|
.popup-gap {
|
width: 100%;
|
height: 20rpx;
|
background: #f7f7f7;
|
}
|
|
.popup-title {
|
display: block;
|
font-size: 40rpx;
|
font-weight: 600;
|
line-height: 1.35;
|
color: #222222;
|
}
|
|
.popup-hours {
|
display: inline-block;
|
margin-top: 18rpx;
|
padding: 10rpx 16rpx;
|
border-radius: 8rpx;
|
background: #f5f7fb;
|
font-size: 24rpx;
|
color: #8c939f;
|
}
|
|
.popup-desc {
|
display: block;
|
margin-top: 24rpx;
|
font-size: 28rpx;
|
line-height: 1.7;
|
color: #444444;
|
}
|
|
.popup-address-row {
|
padding: 24rpx 0;
|
border-top: 1rpx solid #ededed;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
gap: 20rpx;
|
margin-top: 20rpx;
|
}
|
|
.popup-address {
|
flex: 1;
|
min-width: 0;
|
display: flex;
|
align-items: center;
|
font-size: 26rpx;
|
color: #8c939f;
|
image {
|
width: 26rpx;
|
height: 26rpx;
|
margin-right: 8rpx;
|
}
|
text {
|
overflow: hidden;
|
text-overflow: ellipsis;
|
white-space: nowrap;
|
}
|
}
|
|
.popup-distance-wrap {
|
flex-shrink: 0;
|
height: 52rpx;
|
display: flex;
|
align-items: center;
|
font-size: 28rpx;
|
color: #555555;
|
image {
|
width: 48rpx;
|
height: 48rpx;
|
margin-right: 12rpx;
|
}
|
}
|
|
.popup-section {
|
padding: 28rpx 0;
|
border-bottom: 1rpx solid #ededed;
|
}
|
|
.popup-section.no-border {
|
border-bottom: none;
|
padding-bottom: 10rpx;
|
}
|
|
.popup-section-title {
|
display: block;
|
margin-bottom: 20rpx;
|
font-size: 34rpx;
|
font-weight: 600;
|
color: #222222;
|
}
|
|
.popup-section-text {
|
display: block;
|
font-size: 28rpx;
|
line-height: 1.8;
|
color: #4a4a4a;
|
}
|
|
.popup-footer {
|
padding: 24rpx 30rpx calc(24rpx + env(safe-area-inset-bottom));
|
display: flex;
|
gap: 18rpx;
|
}
|
|
.popup-btn {
|
flex: 1;
|
height: 84rpx;
|
border-radius: 42rpx;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
font-size: 32rpx;
|
font-weight: 600;
|
}
|
|
.popup-btn.ghost {
|
border: 2rpx solid #23a7f6;
|
color: #23a7f6;
|
background: #eff9ff;
|
}
|
|
.popup-btn.primary {
|
background: linear-gradient(90deg, #24b2ff 0%, #1d9ff3 100%);
|
color: #ffffff;
|
}
|
|
@keyframes popup-slide-up {
|
from {
|
transform: translateY(100%);
|
opacity: 0;
|
}
|
to {
|
transform: translateY(0);
|
opacity: 1;
|
}
|
}
|
|
.point-card {
|
display: flex;
|
gap: 22rpx;
|
padding: 30rpx;
|
box-sizing: border-box;
|
margin-bottom: 18rpx;
|
border-radius: 24rpx;
|
background: #F6F9FF;
|
box-shadow: 0 10rpx 30rpx rgba(38, 44, 56, 0.05);
|
}
|
|
.thumb {
|
position: relative;
|
flex-shrink: 0;
|
width: 140rpx;
|
height: 140rpx;
|
border-radius: 8rpx;
|
overflow: hidden;
|
}
|
|
.thumb image {
|
width: 100%;
|
}
|
|
.point-main {
|
flex: 1;
|
min-width: 0;
|
}
|
|
.point-head {
|
display: flex;
|
align-items: flex-start;
|
justify-content: space-between;
|
gap: 12rpx;
|
}
|
|
.point-name {
|
flex: 1;
|
line-height: 1.35;
|
font-weight: 600;
|
font-size: 30rpx;
|
color: #222222;
|
}
|
|
.point-distance {
|
flex-shrink: 0;
|
font-size: 24rpx;
|
line-height: 1.4;
|
color: #8C939F;
|
}
|
|
.point-address {
|
margin-top: 10rpx;
|
display: flex;
|
align-items: center;
|
gap: 6rpx;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #6C717A;
|
}
|
|
.point-address image {
|
width: 24rpx;
|
height: 24rpx;
|
margin-right: 4rpx;
|
}
|
|
.point-time {
|
display: block;
|
margin-top: 20rpx;
|
line-height: 1.5;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #8C939F;
|
}
|
</style>
|