store-detail.vue
4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<template>
<view class="page-shell store-detail-page">
<view class="page-blur"></view>
<view class="page-blur-secondary"></view>
<view class="page-blur-tertiary"></view>
<view class="page-content subpage-content">
<view class="subpage-nav">
<view class="subpage-back" @tap="goBack">‹</view>
<view class="subpage-title-wrap">
<text class="subpage-title">门店详情</text>
<text class="subpage-subtitle">空间、交通与到店提醒,都为你提前准备好</text>
</view>
</view>
<view class="detail-hero glass-card">
<image class="hero-image" :src="store.cover" mode="aspectFill" />
<view class="hero-overlay"></view>
<view class="hero-content">
<text class="hero-kicker">{{ store.tag }}</text>
<text class="hero-title">{{ store.name }}</text>
<text class="hero-desc">{{ store.intro }}</text>
</view>
</view>
<view class="subpage-card">
<view class="info-list">
<view class="info-row">
<text class="info-label">地址</text>
<text class="info-value">{{ store.address }}</text>
</view>
<view class="info-row">
<text class="info-label">营业时间</text>
<text class="info-value">{{ store.hours }}</text>
</view>
<view class="info-row">
<text class="info-label">联系电话</text>
<text class="info-value">{{ store.phone }}</text>
</view>
<view class="info-row">
<text class="info-label">交通提示</text>
<text class="info-value">{{ store.traffic }}</text>
</view>
</view>
</view>
<view class="subpage-card">
<view class="section-head">
<text class="section-title">门店亮点</text>
<text class="section-link">会员礼遇</text>
</view>
<view class="meta-grid">
<text v-for="item in store.features" :key="item" class="meta-pill">{{ item }}</text>
</view>
<view class="soft-panel note-panel">
<text class="note-title">到店提醒</text>
<text class="note-desc">{{ store.serviceNote }}</text>
</view>
</view>
<view class="cta-row">
<view class="secondary-button" @tap="callStore">联系门店</view>
<view class="primary-button" @tap="bookStore">预约到店</view>
</view>
</view>
</view>
</template>
<script>
import { findStoreById } from '@/data/mock'
export default {
data() {
return {
store: findStoreById(1)
}
},
onLoad(options) {
this.store = findStoreById(options.id)
},
methods: {
goBack() {
uni.navigateBack({
fail: () => {
uni.redirectTo({ url: '/packageBooking/stores/stores' })
}
})
},
callStore() {
uni.makePhoneCall({ phoneNumber: this.store.phone })
},
bookStore() {
uni.redirectTo({ url: `/pages/booking/booking?storeId=${this.store.id}` })
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/mixins.scss';
@import '@/styles/subpage.scss';
.detail-hero {
position: relative;
overflow: hidden;
min-height: 360rpx;
margin-bottom: 28rpx;
transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 360ms ease;
}
.detail-hero:active {
transform: translateY(-4rpx);
}
.hero-image,
.hero-overlay {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
.hero-overlay {
background: linear-gradient(180deg, rgba(36, 74, 61, 0.08), rgba(36, 74, 61, 0.34));
}
.hero-image {
transition: transform 1.2s ease;
}
.detail-hero:active .hero-image {
transform: scale(1.05);
}
.detail-hero::after {
content: '';
position: absolute;
right: -80rpx;
top: -40rpx;
width: 260rpx;
height: 260rpx;
border-radius: 50%;
background: radial-gradient(circle, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0));
animation: lfFloatSoft 11.6s ease-in-out infinite;
}
.hero-content {
position: relative;
z-index: 2;
padding: 210rpx 34rpx 34rpx;
}
.hero-kicker {
color: rgba(255, 255, 255, 0.86);
}
.hero-title {
color: #fff;
}
.hero-desc {
color: rgba(255, 255, 255, 0.82);
}
.note-panel {
margin-top: 26rpx;
}
.note-title {
display: block;
font-size: 28rpx;
font-weight: 600;
color: $brand-primary-deep;
}
.note-desc {
display: block;
margin-top: 12rpx;
font-size: 24rpx;
line-height: 1.8;
color: $text-secondary;
}
</style>