WXL
19 小时以前 888f941ae16c850c0f1a844ec9436058840920bd
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
<template>
  <view class="vaccine-container">
    <!-- 顶部banner -->
    <view class="banner">
      <image src="/static/vaccine/banner.jpg" mode="aspectFill" class="bg-image" />
      <view class="content">
        <text class="title">疫苗接种预约</text>
        <text class="desc">便捷预约,安全接种</text>
      </view>
    </view>
    
    <!-- 快速入口 -->
    <view class="quick-access">
      <view class="access-item" @tap="navigateTo('/pages/vaccine/book')">
        <image src="/static/vaccine/book.png" mode="aspectFit" class="icon" />
        <text>预约接种</text>
      </view>
      <view class="access-item" @tap="navigateTo('/pages/vaccine/record')">
        <image src="/static/vaccine/record.png" mode="aspectFit" class="icon" />
        <text>接种记录</text>
      </view>
      <view class="access-item" @tap="navigateTo('/pages/vaccine/list')">
        <image src="/static/vaccine/list.png" mode="aspectFit" class="icon" />
        <text>疫苗列表</text>
      </view>
    </view>
    
    <!-- 疫苗分类 -->
    <view class="vaccine-types">
      <view class="section-title">疫苗分类</view>
      <view class="type-list">
        <view 
          class="type-item"
          v-for="(type, index) in vaccineTypes"
          :key="index"
          @tap="navigateToList(type)"
        >
          <image :src="type.icon" mode="aspectFit" class="icon" />
          <text class="name">{{ type.name }}</text>
          <text class="desc">{{ type.desc }}</text>
        </view>
      </view>
    </view>
    
    <!-- 接种点推荐 -->
    <view class="clinic-recommend">
      <view class="section-title">接种点推荐</view>
      <view class="clinic-list">
        <view 
          class="clinic-item"
          v-for="(clinic, index) in clinics"
          :key="index"
          @tap="navigateToClinic(clinic)"
        >
          <image :src="clinic.image" mode="aspectFill" class="image" />
          <view class="info">
            <text class="name">{{ clinic.name }}</text>
            <text class="address">{{ clinic.address }}</text>
            <view class="tags">
              <text v-for="(tag, idx) in clinic.tags" :key="idx">{{ tag }}</text>
            </view>
          </view>
        </view>
      </view>
    </view>
    
    <!-- 温馨提示 -->
    <view class="notice-card">
      <view class="section-title">温馨提示</view>
      <view class="notice-list">
        <view class="notice-item" v-for="(notice, index) in notices" :key="index">
          <text class="dot"></text>
          <text class="content">{{ notice }}</text>
        </view>
      </view>
    </view>
  </view>
</template>
 
<script setup>
import { ref } from 'vue'
 
// 疫苗分类
const vaccineTypes = ref([
  {
    id: 1,
    name: '儿童疫苗',
    desc: '0-6岁常规接种',
    icon: '/static/vaccine/child.png'
  },
  {
    id: 2,
    name: '成人疫苗',
    desc: '18岁以上人群',
    icon: '/static/vaccine/adult.png'
  },
  {
    id: 3,
    name: '老年疫苗',
    desc: '60岁以上人群',
    icon: '/static/vaccine/elder.png'
  },
  {
    id: 4,
    name: '流感疫苗',
    desc: '季节性接种',
    icon: '/static/vaccine/flu.png'
  }
])
 
// 接种点列表
const clinics = ref([
  {
    id: 1,
    name: '青岛镜湖医院预防接种门诊',
    address: '青岛连胜马路33号',
    image: '/static/hospital/kiang-wu.jpg',
    tags: ['全天候接种', '可预约', '免费停车']
  },
  {
    id: 2,
    name: '青岛科大医院疫苗中心',
    address: '青岛氹仔大学大马路',
    image: '/static/hospital/must.jpg',
    tags: ['专业团队', '环境舒适', '交通便利']
  }
])
 
// 温馨提示
const notices = [
  '请携带身份证件和接种本',
  '接种前请保持良好的身体状态',
  '接种后请在现场留观30分钟',
  '如有不适请及时就医'
]
 
// 页面跳转
const navigateTo = (url) => {
  uni.navigateTo({ url })
}
 
// 跳转到疫苗列表
const navigateToList = (type) => {
  uni.navigateTo({
    url: `/pages/vaccine/list?typeId=${type.id}&typeName=${type.name}`
  })
}
 
// 跳转到接种点详情
const navigateToClinic = (clinic) => {
  uni.navigateTo({
    url: `/pages/hospital/detail?id=${clinic.id}`
  })
}
</script>
 
<style lang="scss">
.vaccine-container {
  min-height: 100vh;
  background: $bg-color;
  
  .banner {
    position: relative;
    height: 300rpx;
    
    .bg-image {
      width: 100%;
      height: 100%;
    }
    
    .content {
      position: absolute;
      left: 40rpx;
      bottom: 40rpx;
      color: #fff;
      
      .title {
        font-size: 40rpx;
        font-weight: bold;
        margin-bottom: 12rpx;
        display: block;
      }
      
      .desc {
        font-size: 28rpx;
        opacity: 0.9;
      }
    }
  }
  
  .quick-access {
    margin: -40rpx 20rpx 0;
    padding: 30rpx;
    background: #fff;
    border-radius: $radius-lg;
    display: flex;
    justify-content: space-around;
    box-shadow: $shadow-sm;
    
    .access-item {
      text-align: center;
      
      .icon {
        width: 80rpx;
        height: 80rpx;
        margin-bottom: 12rpx;
      }
      
      text {
        font-size: 26rpx;
        color: $text-regular;
      }
      
      &:active {
        opacity: 0.8;
      }
    }
  }
  
  .section-title {
    font-size: 32rpx;
    color: $text-primary;
    font-weight: bold;
    margin-bottom: 20rpx;
  }
  
  .vaccine-types {
    margin: 30rpx 20rpx;
    
    .type-list {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20rpx;
      
      .type-item {
        background: #fff;
        border-radius: $radius-lg;
        padding: 30rpx;
        box-shadow: $shadow-sm;
        
        .icon {
          width: 80rpx;
          height: 80rpx;
          margin-bottom: 16rpx;
        }
        
        .name {
          font-size: 30rpx;
          color: $text-primary;
          font-weight: bold;
          margin-bottom: 8rpx;
          display: block;
        }
        
        .desc {
          font-size: 24rpx;
          color: $text-secondary;
        }
        
        &:active {
          transform: scale(0.98);
        }
      }
    }
  }
  
  .clinic-recommend {
    margin: 30rpx 20rpx;
    
    .clinic-list {
      .clinic-item {
        background: #fff;
        border-radius: $radius-lg;
        margin-bottom: 20rpx;
        box-shadow: $shadow-sm;
        overflow: hidden;
        
        .image {
          width: 100%;
          height: 300rpx;
        }
        
        .info {
          padding: 20rpx;
          
          .name {
            font-size: 32rpx;
            color: $text-primary;
            font-weight: bold;
            margin-bottom: 8rpx;
            display: block;
          }
          
          .address {
            font-size: 26rpx;
            color: $text-regular;
            margin-bottom: 16rpx;
            display: block;
          }
          
          .tags {
            display: flex;
            flex-wrap: wrap;
            gap: 12rpx;
            
            text {
              font-size: 22rpx;
              color: $primary-color;
              background: $primary-light;
              padding: 4rpx 12rpx;
              border-radius: $radius-sm;
            }
          }
        }
        
        &:active {
          transform: scale(0.99);
        }
      }
    }
  }
  
  .notice-card {
    margin: 30rpx 20rpx;
    background: #fff;
    border-radius: $radius-lg;
    padding: 30rpx;
    box-shadow: $shadow-sm;
    
    .notice-list {
      .notice-item {
        display: flex;
        align-items: flex-start;
        margin-bottom: 16rpx;
        
        &:last-child {
          margin-bottom: 0;
        }
        
        .dot {
          width: 12rpx;
          height: 12rpx;
          background: $primary-color;
          border-radius: 50%;
          margin-top: 12rpx;
          margin-right: 12rpx;
          flex-shrink: 0;
        }
        
        .content {
          flex: 1;
          font-size: 26rpx;
          color: $text-regular;
          line-height: 1.6;
        }
      }
    }
  }
  
  .scroll-view {
    white-space: nowrap;
    padding: 0 20rpx;
    &::-webkit-scrollbar {
      display: none;
    }
  }
}
</style>