coachHome.vue
12.6 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
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
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<template>
<view class="home_container">
<u-navbar
title="世纪创软"
:placeholder="true"
leftIconSize="0"
titleStyle="font-family: STKaiti, Kati, Kati_GB2312, serif;color: #000;fontSize: 48rpx;fontWeight: 600;"
/>
<!-- 头部教练信息 -->
<view class="nav_header">
<view class="left_box">
<image src="@/static/logo.png" mode="widthFix" class="avatar_img"></image>
<view style="display: flex;flex-direction: column;">
<text class="title">教练名称</text>
<text class="tag">标签名号</text>
</view>
</view>
<view class="right_box">
<u-icon name="bell-fill" size="28" color="#FACC15"></u-icon>
<text class="notice">23</text>
</view>
</view>
<!-- 数据卡片 -->
<view class="data_card">
<!-- 今日订单 -->
<view class="card_item">
<text class="card_title">今日订单</text>
<text class="card_value">12<text style="color: #6B7280;font-size: 20rpx;margin-left: 10rpx;">单</text></text>
<view style="display: flex;align-items: center;">
<u-icon name="arrow-upward" color="#22C55E" size="12"></u-icon>
<text class="other_text" style="color: #22C55E;">较昨日 +2</text>
</view>
<view class="right_icon">
<u-icon name="calendar-fill" size="16" :color="ThemeColor.PrimaryColor"></u-icon>
</view>
</view>
<!-- 待处理预约 -->
<view class="card_item">
<text class="card_title">待处理预约</text>
<text class="card_value">5<text style="color: #6B7280;font-size: 20rpx;margin-left: 10rpx;">单</text></text>
<view style="display: flex;align-items: center;">
<u-icon name="info-circle-fill" color="#F97316" size="12"></u-icon>
<text class="other_text" style="color: #F97316;">需及时处理</text>
</view>
<view class="right_icon">
<u-icon name="clock-fill" size="14" :color="ThemeColor.PrimaryColor"></u-icon>
</view>
</view>
<!-- 本月收入 -->
<view class="card_item">
<text class="card_title">本月收入</text>
<text class="card_value">15,280<text style="color: #6B7280;font-size: 20rpx;margin-left: 10rpx;">元</text></text>
<view style="display: flex;align-items: center;">
<u-icon name="arrow-upward" color="#22C55E" size="12"></u-icon>
<text class="other_text" style="color: #22C55E;">月同比 +15%</text>
</view>
<view class="right_icon">
<u-icon name="rmb" size="16" :color="ThemeColor.PrimaryColor"></u-icon>
</view>
</view>
<!-- 综合评分 -->
<view class="card_item">
<text class="card_title">综合评分</text>
<text class="card_value">4.9<text style="color: #6B7280;font-size: 20rpx;margin-left: 10rpx;">分</text></text>
<view style="display: flex;align-items: center;">
<u-icon name="thumb-up-fill" color="#3B82F6" size="12"></u-icon>
<text class="other_text" style="color: #3B82F6;">好评 98%</text>
</view>
<view class="right_icon">
<u-icon name="star-fill" size="15" :color="ThemeColor.PrimaryColor"></u-icon>
</view>
</view>
</view>
<!-- 今日安排 -->
<view class="toDay">
<u-cell-group :border="false">
<u-cell title="今日课程安排" :titleStyle="{fontSize: '28rpx', fontWeight: 500}" center :border="false">
<text slot="icon" class="title_before"></text>
<text slot="value" style="color: #4B5563;font-size: 24rpx;">查看完整课程</text>
</u-cell>
</u-cell-group>
<view class="courseList">
<view class="courseItem">
<view class="dis-flex flex-dir-column flex-gap10 flex-y-center">
<text class="family-number col-0 f-w-500 f-24">09:00</text>
<text class="f-22" style="color: #6B7280;">上午</text>
</view>
<view class="dis-flex flex-dir-column flex-gap10">
<view class="dis-flex flex-y-center">
<text class="state-success">已确认</text>
<text class="f-w-500 f-24 m-l-20">私教课程·力量训练</text>
</view>
<view class="dis-flex flex-y-center">
<text class="f-22" style="color: #4B5563;">学员:王新旭</text>
<text style="width: 1px;height: 20rpx;background-color: #4B5563;margin: 0 4rpx;"></text>
<text class="f-22" style="color: #4B5563;">时长:60分钟</text>
</view>
</view>
</view>
<view class="courseItem" style="background-color: #fff;">
<view class="dis-flex flex-dir-column flex-gap10 flex-y-center">
<text class="family-number col-0 f-w-500 f-24">11:00</text>
<text class="f-22" style="color: #6B7280;">上午</text>
</view>
<view class="dis-flex flex-dir-column flex-gap10">
<view class="dis-flex flex-y-center">
<text class="state-primary">待确认</text>
<text class="f-w-500 f-24 m-l-20">团体教程·瑜伽基础</text>
</view>
<view class="dis-flex flex-y-center">
<text class="f-22" style="color: #4B5563;">学员:团体课(6人)</text>
<text style="width: 1px;height: 20rpx;background-color: #4B5563;margin: 0 4rpx;"></text>
<text class="f-22" style="color: #4B5563;">时长:60分钟</text>
</view>
</view>
</view>
<view class="courseItem">
<view class="dis-flex flex-dir-column flex-gap10 flex-y-center">
<text class="family-number col-0 f-w-500 f-24">15:00</text>
<text class="f-22" style="color: #6B7280;">下午</text>
</view>
<view class="dis-flex flex-dir-column flex-gap10">
<view class="dis-flex flex-y-center">
<text class="state-success">已确认</text>
<text class="f-w-500 f-24 m-l-20">私教课程·体态矫正</text>
</view>
<view class="dis-flex flex-y-center">
<text class="f-22" style="color: #4B5563;">学员:林雨晴</text>
<text style="width: 1px;height: 20rpx;background-color: #4B5563;margin: 0 4rpx;"></text>
<text class="f-22" style="color: #4B5563;">时长:60分钟</text>
</view>
</view>
</view>
</view>
</view>
<!-- 学员反馈 -->
<view class="studentBack">
<u-cell-group :border="false">
<u-cell title="学员反馈" :titleStyle="{fontSize: '28rpx', fontWeight: 500}" center :border="false">
<text slot="icon" class="title_before"></text>
<text slot="value" style="color: #4B5563;font-size: 24rpx;">查看全部</text>
</u-cell>
</u-cell-group>
<view class="backList">
<view class="backItem">
<view class="dis-flex flex-gap20 mb-10">
<u-avatar src="https://xfwbzs.crgx.net/static/img/profile.473f5971.jpg" size="36"></u-avatar>
<view class="dis-flex flex-dir-column flex-gap10">
<text class="f-24 col-0 f-w-500">林雨晴</text>
<u-rate :count="count" v-model="value" :readonly="true" activeColor="#FACC15" size="12" :allowHalf="true"></u-rate>
</view>
</view>
<text class="f-24 u-line-2" style="color: #4B5563;">教练非常专业,针对我的情况制定了很合适的训练计划,每次训练都有收货</text>
</view>
<view class="backItem">
<view class="dis-flex flex-gap20 mb-10">
<u-avatar src="https://xfwbzs.crgx.net/static/img/profile.473f5971.jpg" size="36"></u-avatar>
<view class="dis-flex flex-dir-column flex-gap10">
<text class="f-24 col-0 f-w-500">张志远</text>
<u-rate :count="count" v-model="value" :readonly="true" activeColor="#FACC15" size="12" :allowHalf="true"></u-rate>
</view>
</view>
<text class="f-24 u-line-2" style="color: #4B5563;">教练很有耐心,动作讲解很细致,让我对健身有更深的理解</text>
</view>
</view>
</view>
<!-- 最近订单 -->
<view class="newOrder">
<u-cell-group :border="false">
<u-cell title="最近订单" :titleStyle="{fontSize: '28rpx', fontWeight: 500}" center :border="false">
<text slot="icon" class="title_before"></text>
<text slot="value" style="color: #4B5563;font-size: 24rpx;">查看全部</text>
</u-cell>
</u-cell-group>
<view class="orderList">
<view class="orderItem">
<view class="dis-flex flex-x-between flex-y-center mb-10">
<view class="dis-flex flex-gap20 mb-10">
<u-avatar src="https://xfwbzs.crgx.net/static/img/profile.473f5971.jpg" size="36"></u-avatar>
<view class="dis-flex flex-dir-column flex-gap10">
<text class="f-24 col-0">刘天成</text>
<text class="state-success">已确认</text>
</view>
</view>
<text class="right_btn">查看详情</text>
</view>
<view class="dis-flex flex-y-center flex-gap10 f-24" style="color: #4B5563;">
<text>私教课程·增肌计划</text>
<text>2025-03-27 10:00</text>
</view>
</view>
<view class="orderItem">
<view class="dis-flex flex-x-between flex-y-center mb-10">
<view class="dis-flex flex-gap20 mb-10">
<u-avatar src="https://xfwbzs.crgx.net/static/img/profile.473f5971.jpg" size="36"></u-avatar>
<view class="dis-flex flex-dir-column flex-gap10">
<text class="f-24 col-0">赵雪莹</text>
<text class="state-primary">待确认</text>
</view>
</view>
<text class="right_btn">确认预约</text>
</view>
<view class="dis-flex flex-y-center flex-gap10 f-24" style="color: #4B5563;">
<text>私教课程·减脂塑形</text>
<text>2025-03-27 10:00</text>
</view>
</view>
</view>
</view>
<CommonTabbar />
</view>
</template>
<script>
import ThemeColor from '@/utils/themeColor.js'
export default {
data() {
return {
ThemeColor,
count: 5,
value: 4.5,
dataList: [
{ title: '今日订单', value: 12, iconName: 'calendar-fill', other: 2, otherIcon: 'arrow-upward', otherText: `较昨日 + `, textColor: '#22C55E' },
{ title: '待处理预约', value: 5, iconName: 'clock-fill', other: '', otherIcon: 'info-circle-fill', otherText: `需及时处理`, textColor: '#F97316' },
{ title: '本月收入', value: 15280, iconName: 'rmb', other: '15%', otherIcon: 'arrow-upward', otherText: `月同比 + `, textColor: '#22C55E' },
{ title: '综合评分', value: 4.9, iconName: 'star-fill', other: '98%', otherIcon: 'thumb-up-fill', otherText: `好评`, textColor: '#3B82F6' }
]
};
}
}
</script>
<style lang="scss" scoped>
.home_container{
background-color: #fff;
min-height: calc(100vh - 88rpx);
padding-bottom: 60rpx;
}
.nav_header{
display: flex;
align-items: center;
justify-content: space-between;
padding: 10rpx 30rpx;
background-color: #fff;
border-bottom: 1px solid #eee;
.left_box{
display: flex;
align-items: center;
gap: 15rpx;
.avatar_img{
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}
.title{
font-size: 32rpx;
color: #000;
font-weight: 500;
line-height: 40rpx;
}
.tag{
font-size: 24rpx;
color: #6b7280;
}
}
.right_box{
position: relative;
.notice{
position: absolute;
top: -4rpx;
right: 4rpx;
width: 30rpx;
height: 30rpx;
font-size: 20rpx;
background-color: red;
color: #fff;
border-radius: 50%;
text-align: center;
line-height: 30rpx;
}
}
}
.data_card{
display: grid;
grid-template-columns: repeat(2, 1fr); /* 两列,每列占等分 */
grid-template-rows: repeat(2, 1fr); /* 两行,每行占等分 */
gap: 20rpx; /* 单元格间距 */
margin-top: 20rpx;
padding: 0 30rpx;
.card_item{
position: relative;
display: flex;
flex-direction: column;
gap: 10rpx;
padding: 20rpx;
justify-content: space-around;
background-color: #fff;
border-radius: 20rpx;
box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 4rpx 0px;
.card_title{
font-size: 24rpx;
color: #4B5563;
}
.card_value{
color: #000;
font-size: 32rpx;
font-weight: 500;
font-family: SemiBold, Verdana, Georgia, Times, 'Times New Roman', serif;
}
.other_text{
font-size: 20rpx;
margin-left: 10rpx;
}
.right_icon{
position: absolute;
top: 20rpx;
right: 20rpx;
}
}
}
.toDay, .studentBack, .newOrder{
padding: 0 30rpx;
margin-top: 20rpx;
}
.courseList, .backList, .orderList{
display: flex;
flex-direction: column;
align-items: center;
gap: 10rpx;
padding: 20rpx;
box-shadow: rgba(17, 17, 26, 0.04) 0px 1px 0px;
border-radius: 10rpx;
.courseItem{
display: flex;
align-items: center;
gap: 30rpx;
width: 100%;
border-radius: 10rpx;
padding: 20rpx 30rpx;
background-color: #f4f5fa;
}
.backItem{
width: 100%;
border-radius: 10rpx;
padding: 20rpx 30rpx;
background-color: #f9fafb;
}
.orderItem{
width: 100%;
border-radius: 10rpx;
padding: 20rpx 30rpx;
.right_btn{
font-size: 24rpx;
border-radius: 60rpx;
width: 120rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
background: linear-gradient( 270deg, $uni-color-primary 0%, #FCD723 100%);
color: #fff;
}
}
}
.title_before{
width: 8rpx;
height: 32rpx;
border-radius: 4rpx;
background-color: $uni-color-primary;
}
</style>