home.vue
6.64 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
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
<template>
<view class="page-container">
<view class="top-section">
<!-- 用户信息 -->
<view class="user-info">
<view class="avatar">
<view class="avatar-placeholder">📄</view>
</view>
<view class="user-desc">注册会员8709745760778985472</view>
</view>
<!-- 会员卡片 -->
<view class="member-card">
<view class="card-header">
<view class="card-name">江行知</view>
<view class="bind-btn">绑定学员 ⇄</view>
</view>
<view class="card-id">证件号:360681201804040811</view>
<view class="card-func">
<view class="func-item" @click="goToInfo">
<view class="func-icon">⿱</view>
<view class="func-text">人员信息</view>
</view>
<view class="func-item">
<view class="func-icon">✓</view>
<view class="func-text">参赛能力认证</view>
</view>
<view class="func-item">
<view class="func-icon">🏆</view>
<view class="func-text">成绩查询</view>
</view>
<view class="func-item">
<view class="func-icon">↻</view>
<view class="func-text">参赛记录</view>
</view>
</view>
</view>
</view>
<view class="bottom-section">
<view class="info-title">
<view class="title-line"></view>
<text>人员信息</text>
</view>
<view class="info-list">
<view class="info-item">
<view class="item-label">姓名</view>
<view class="item-value">江行知</view>
</view>
<view class="info-item">
<view class="item-label">国籍</view>
<view class="item-value">中国</view>
</view>
<view class="info-item">
<view class="item-label">证件类型</view>
<view class="item-value">身份证</view>
</view>
<view class="info-item">
<view class="item-label">身份证号</view>
<view class="item-value">360681201804040811</view>
</view>
<view class="info-item">
<view class="item-label">生日</view>
<view class="item-value">2018-04-04</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
const userInfo = ref({
memberNo: '8709745760778985472',
name: '江行知',
idCard: '360681201804040811',
nationality: '中国',
idType: '身份证',
birthday: '2018-04-04'
})
const goToInfo = () => {
console.log('跳转到人员信息页')
}
</script>
<style lang="scss" scoped>
.page-container {
min-height: 100vh;
background: linear-gradient(180deg, #FFF9E8 0%, #FFFFFF 100%);
padding: 0 30rpx;
box-sizing: border-box;
}
.top-section {
padding-top: 40rpx;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 40rpx;
}
.title {
font-size: 36rpx;
font-weight: 500;
color: #333;
margin: 0 auto;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.more-btn {
display: flex;
align-items: center;
gap: 20rpx;
margin-left: auto;
background: #FFFFFF;
padding: 10rpx 20rpx;
border-radius: 40rpx;
}
.dots {
font-size: 32rpx;
color: #666;
line-height: 1;
}
.circle {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
border: 2rpx solid #666;
position: relative;
&::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background: #666;
}
}
.user-info {
display: flex;
align-items: center;
gap: 30rpx;
margin-bottom: 40rpx;
}
.avatar {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
background: #F5F5F5;
display: flex;
align-items: center;
justify-content: center;
font-size: 48rpx;
border: 4rpx solid #E8E8E8;
}
.avatar-placeholder {
color: #999;
}
.user-desc {
font-size: 36rpx;
color: #333;
font-weight: 500;
}
/* 会员卡片 */
.member-card {
background: linear-gradient(135deg, #F7E090 0%, #E6C560 100%);
border-radius: 24rpx;
padding: 40rpx;
position: relative;
overflow: hidden;
margin-bottom: 30rpx;
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url('data:image/svg+xml,%3Csvg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0,50 Q250,20 500,50 T1000,50" fill="none" stroke="%23E6C560" stroke-width="2" opacity="0.3"/%3E%3C/svg%3E');
background-size: cover;
z-index: 0;
}
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
position: relative;
z-index: 1;
}
.card-name {
font-size: 40rpx;
font-weight: bold;
color: #222;
}
.bind-btn {
font-size: 28rpx;
color: #666;
}
.card-id {
font-size: 28rpx;
color: #555;
margin-bottom: 40rpx;
position: relative;
z-index: 1;
}
/* 功能入口 */
.card-func {
display: flex;
justify-content: space-between;
position: relative;
z-index: 1;
}
.func-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 10rpx;
cursor: pointer;
}
.func-icon {
width: 60rpx;
height: 60rpx;
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #333;
}
.func-text {
font-size: 28rpx;
color: #333;
font-weight: 500;
}
/* ========== 下半部分:人员信息 ========== */
.bottom-section {
background: #FFFFFF;
border-radius: 24rpx 24rpx 0 0;
padding: 30rpx;
margin-top: 20rpx;
}
.info-title {
display: flex;
align-items: center;
gap: 16rpx;
margin-bottom: 30rpx;
font-size: 36rpx;
font-weight: 500;
color: #333;
}
.title-line {
width: 12rpx;
height: 32rpx;
background: #E6C560;
border-radius: 4rpx;
}
.info-list {
display: flex;
flex-direction: column;
gap: 30rpx;
}
.info-item {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 30rpx;
border-bottom: 1rpx solid #F0F0F0;
&:last-child {
border-bottom: none;
padding-bottom: 0;
}
}
.item-label {
font-size: 32rpx;
color: #333;
font-weight: 500;
}
.item-value {
font-size: 32rpx;
color: #999;
}
/* 底部固定按钮(可选) */
.fixedBottom {
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 20rpx 30rpx;
background: #FFFFFF;
border-top: 1rpx solid #F0F0F0;
}
.btn-red {
width: 100%;
height: 88rpx;
line-height: 88rpx;
background: #C40F18;
color: #FFFFFF;
border-radius: 12rpx;
font-size: 32rpx;
font-weight: 500;
border: none;
}
</style>