record.vue
4.12 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
184
185
186
187
188
189
<template>
<view class="page-shell record-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="record-nav">
<view class="back-button" @tap="goBack">‹</view>
<view class="record-nav-main">
<text class="record-title">预约记录</text>
<text class="record-subtitle">最近的到店安排与护理时段</text>
</view>
</view>
<view v-for="item in records" :key="item.id" class="record-item glass-card" @tap="goDetail(item)">
<view class="record-top">
<text class="status-chip" :class="item.statusClass">{{ item.status }}</text>
<text class="record-date">{{ item.date }}</text>
</view>
<text class="record-store">{{ item.store }}</text>
<view class="record-meta-panel">
<view class="record-meta-item">
<text class="record-meta-label">预约时段</text>
<text class="record-meta-value">{{ item.displayTime }}</text>
</view>
<view class="record-meta-item">
<text class="record-meta-label">护理顾问</text>
<text class="record-meta-value">{{ item.therapist }}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { bookingRecords } from '@/data/mock'
export default {
data() {
return {
records: bookingRecords
}
},
methods: {
goBack() {
uni.navigateBack({
fail: () => {
uni.redirectTo({
url: '/pages/home/home'
})
}
})
},
goDetail(item) {
uni.navigateTo({
url: `/packageBooking/detail/detail?id=${item.id}`
})
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/mixins.scss';
@import '@/styles/subpage.scss';
.record-nav {
display: flex;
align-items: center;
margin-bottom: 28rpx;
}
.back-button {
width: 72rpx;
height: 72rpx;
margin-right: 20rpx;
border-radius: 24rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 42rpx;
color: $brand-primary-deep;
background: rgba(255, 255, 255, 0.82);
transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms ease;
}
.back-button:active {
transform: scale(0.95);
box-shadow: 0 12rpx 26rpx rgba(54, 77, 64, 0.08);
}
.record-title {
display: block;
font-size: 44rpx;
font-weight: 700;
}
.record-subtitle {
display: block;
margin-top: 10rpx;
font-size: 24rpx;
color: $text-secondary;
}
.record-item {
padding: 32rpx;
margin-bottom: 22rpx;
transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 320ms ease;
animation: lfRevealUp 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.record-item:nth-of-type(1) { animation-delay: 0.08s; }
.record-item:nth-of-type(2) { animation-delay: 0.16s; }
.record-item:nth-of-type(3) { animation-delay: 0.24s; }
.record-item:nth-of-type(4) { animation-delay: 0.32s; }
.record-item:active {
transform: translateY(-4rpx);
}
.record-top,
.record-meta-panel {
display: flex;
align-items: center;
justify-content: space-between;
}
.status-chip {
@include chip-status;
font-weight: 600;
}
.confirmed {
background: rgba(100, 140, 118, 0.14);
}
.pending {
background: rgba(210, 191, 156, 0.18);
}
.finished {
background: rgba(182, 142, 154, 0.16);
}
.record-date,
.record-meta-label {
font-size: 24rpx;
color: $text-secondary;
}
.record-store {
display: block;
margin: 20rpx 0 22rpx;
font-size: 34rpx;
line-height: 1.4;
font-weight: 700;
}
.record-meta-panel {
padding: 22rpx 24rpx;
border-radius: 28rpx;
background: rgba(210, 191, 156, 0.10);
box-shadow: $shadow-soft;
transition: transform 260ms ease, background 260ms ease;
}
.record-item:active .record-meta-panel {
transform: translateY(-2rpx);
background: rgba(210, 191, 156, 0.14);
}
.record-meta-item {
width: 48%;
}
.record-meta-label,
.record-meta-value {
display: block;
}
.record-meta-value {
margin-top: 8rpx;
font-size: 28rpx;
font-weight: 600;
color: $brand-primary-deep;
}
</style>