|
1
|
-<template>
|
|
|
|
2
|
- <view class="container">
|
|
|
|
3
|
- <!-- 自定义标题栏 -->
|
|
|
|
4
|
- <uv-navbar leftIcon="" placeholder bgColor="/static/topBg.png">
|
|
|
|
5
|
- <template v-slot:center>
|
|
|
|
6
|
- <view class="uv-nav-slot">
|
|
|
|
7
|
- <image src="/static/my/myTitle.png" mode="heightFix" style="height: 44rpx;"></image>
|
1
|
+<template>
|
|
|
|
2
|
+ <view class="container">
|
|
|
|
3
|
+ <uv-navbar leftIcon="" placeholder bgColor="rgba(255, 255, 255, 0)" />
|
|
|
|
4
|
+
|
|
|
|
5
|
+ <view class="content-box">
|
|
|
|
6
|
+ <view class="header">
|
|
|
|
7
|
+ <view class="avatar">
|
|
|
|
8
|
+ <image v-if="state.userInfo?.avatar" :src="state.userInfo.avatar" style="width: 100%;height: 100%;"></image>
|
|
8
|
</view>
|
9
|
</view>
|
|
9
|
- </template>
|
|
|
|
10
|
- </uv-navbar>
|
|
|
|
11
|
-
|
|
|
|
12
|
- <view class="content-box">
|
|
|
|
13
|
- <div class="content-padding">
|
|
|
|
14
|
- <!-- 用户信息 -->
|
|
|
|
15
|
- <view class="user-info">
|
|
|
|
16
|
- <view class="center-avatar">
|
|
|
|
17
|
- <view class="center-inner">
|
|
|
|
18
|
- <image src="/static/my/avatar.png" style="width: 100%;height: 100%;"></image>
|
|
|
|
19
|
- </view>
|
10
|
+ <view class="fm-box">
|
|
|
|
11
|
+ <view style="font-size: 36rpx;">
|
|
|
|
12
|
+ {{ state.userInfo?.nickName || "未知" }}
|
|
20
|
</view>
|
13
|
</view>
|
|
21
|
- <view class="loginTo-btn">
|
|
|
|
22
|
- 登录/注册
|
14
|
+ <view class="">
|
|
|
|
15
|
+ {{ state.userInfo?.phonenumber ? state.userInfo?.phonenumber.slice(0, 8) + '****' : "" }}
|
|
23
|
</view>
|
16
|
</view>
|
|
24
|
</view>
|
17
|
</view>
|
|
25
|
-
|
|
|
|
26
|
- <view class="nav-list">
|
|
|
|
27
|
- <view class="nav-item">
|
|
|
|
28
|
- <view style="display: flex;align-items: center;">
|
|
|
|
29
|
- <uv-icon name="/static/my/student.png" :size="22"></uv-icon>
|
|
|
|
30
|
- <view style="margin-left: 26rpx;color: #6a6a6a;">绑定学生</view>
|
18
|
+ </view>
|
|
|
|
19
|
+
|
|
|
|
20
|
+ <view style="background-color: #fff;padding: 20rpx 30rpx;margin-top: 60rpx;border-radius: 20rpx;font-size: 28rpx;">
|
|
|
|
21
|
+ <view style="display: flex;justify-content: space-between;">
|
|
|
|
22
|
+ <view class="">
|
|
|
|
23
|
+ 我的孩子
|
|
|
|
24
|
+ </view>
|
|
|
|
25
|
+ <view style="display: flex;justify-content: space-between;align-items: center;color: #7175f0;">
|
|
|
|
26
|
+ 添加<uv-icon name="arrow-right" color="#7175f0" size="14"></uv-icon>
|
|
|
|
27
|
+ </view>
|
|
|
|
28
|
+ </view>
|
|
|
|
29
|
+ <view style="display: grid;grid-template-columns: repeat(2, 1fr);gap: 20rpx;margin-top: 30rpx;">
|
|
|
|
30
|
+ <view v-for="item in state.students" style="display: flex;border: 2rpx solid #e4e9ff;padding: 10rpx;border-radius: 20rpx;">
|
|
|
|
31
|
+ <view style="flex-shrink: 0;width: 90rpx;height: 90rpx;border-radius: 50%;background-color: #bdceff;">
|
|
|
|
32
|
+ <image v-if="item.avatar" :src="item.avatar" style="width: 100%;height: 100%;"></image>
|
|
|
|
33
|
+ </view>
|
|
|
|
34
|
+ <view style="flex: 1;display: flex;flex-direction: column;justify-content: space-between;margin-left: 20rpx;">
|
|
|
|
35
|
+ <view class="">
|
|
|
|
36
|
+ {{ item.name || "未知" }}
|
|
|
|
37
|
+ </view>
|
|
|
|
38
|
+ <view style="font-size: 28rpx;">
|
|
|
|
39
|
+ {{ item.grade || "-" }}
|
|
|
|
40
|
+ </view>
|
|
31
|
</view>
|
41
|
</view>
|
|
32
|
- <uv-icon name="arrow-right" :size="16"></uv-icon>
|
|
|
|
33
|
</view>
|
42
|
</view>
|
|
34
|
- <view class="nav-item">
|
|
|
|
35
|
- <view style="display: flex;align-items: center;">
|
|
|
|
36
|
- <uv-icon name="/static/my/print.png" :size="24"></uv-icon>
|
|
|
|
37
|
- <view style="margin-left: 26rpx;color: #6a6a6a;">打印记录</view>
|
43
|
+ </view>
|
|
|
|
44
|
+ </view>
|
|
|
|
45
|
+
|
|
|
|
46
|
+ <view style="background-color: #fff;padding: 20rpx 30rpx;border-radius: 20rpx;font-size: 28rpx;margin-top: 40rpx;">
|
|
|
|
47
|
+ <view style="margin-bottom: 30rpx;">
|
|
|
|
48
|
+ 我的报名
|
|
|
|
49
|
+ </view>
|
|
|
|
50
|
+ <template v-if="state.signupList.length">
|
|
|
|
51
|
+ <view v-for="item in state.signupList" style="display: flex;justify-content: space-between;border-radius: 20rpx;border: 2rpx solid #bdceff;padding: 10rpx;">
|
|
|
|
52
|
+ <view style="background-color: #b8cfff;border-radius: 16rpx;flex-shrink: 0;width: 100rpx;height: 100rpx;">
|
|
|
|
53
|
+ <image v-if="item.avatar" :src="item.avatar" style="width: 100%;height: 100%;"></image>
|
|
|
|
54
|
+ </view>
|
|
|
|
55
|
+ <view style="flex: 1;display: flex;flex-direction: column;justify-content: space-between;margin-left: 20rpx;">
|
|
|
|
56
|
+ <view class="">
|
|
|
|
57
|
+ 华地校区-四年级-数学-A+班
|
|
|
|
58
|
+ </view>
|
|
|
|
59
|
+ <view class="">
|
|
|
|
60
|
+ 10-01至10-31 19:00-21:00
|
|
|
|
61
|
+ </view>
|
|
38
|
</view>
|
62
|
</view>
|
|
39
|
- <uv-icon name="arrow-right" :size="16"></uv-icon>
|
|
|
|
40
|
</view>
|
63
|
</view>
|
|
|
|
64
|
+ </template>
|
|
|
|
65
|
+ <view v-else style="text-align: center;color: #666;padding: 30rpx 0;">
|
|
|
|
66
|
+ 暂无报名数据
|
|
41
|
</view>
|
67
|
</view>
|
|
42
|
- </div>
|
|
|
|
43
|
- </view>
|
|
|
|
44
|
- </view>
|
|
|
|
45
|
-</template>
|
|
|
|
46
|
-
|
|
|
|
47
|
-<script setup>
|
|
|
|
48
|
-
|
|
|
|
49
|
-</script>
|
|
|
|
50
|
-
|
|
|
|
51
|
-<style lang="scss" scoped>
|
|
|
|
52
|
- .container {
|
|
|
|
53
|
- background-color: #f7f8fa;
|
|
|
|
54
|
- height: 100vh;
|
|
|
|
55
|
- overflow-y: auto;
|
|
|
|
56
|
- display: flex;
|
|
|
|
57
|
- flex-direction: column;
|
68
|
+ </view>
|
|
|
|
69
|
+ </view>
|
|
|
|
70
|
+ </view>
|
|
|
|
71
|
+</template>
|
|
|
|
72
|
+
|
|
|
|
73
|
+<script setup>
|
|
|
|
74
|
+ import {
|
|
|
|
75
|
+ reactive,
|
|
|
|
76
|
+ onMounted
|
|
|
|
77
|
+ } from 'vue';
|
|
|
|
78
|
+ import { userInfoApi, myStudentsApi, userSignUpListApi } from "@/api/index.js"
|
|
|
|
79
|
+
|
|
|
|
80
|
+ const state = reactive({
|
|
|
|
81
|
+ userInfo: {},
|
|
|
|
82
|
+ signupList: [],
|
|
|
|
83
|
+ students: []
|
|
|
|
84
|
+ })
|
|
|
|
85
|
+
|
|
|
|
86
|
+ onMounted(() => {
|
|
|
|
87
|
+ getUserInfo()
|
|
|
|
88
|
+ getMyStudents()
|
|
|
|
89
|
+ getuserSignUpList()
|
|
|
|
90
|
+ })
|
|
|
|
91
|
+
|
|
|
|
92
|
+ const getUserInfo = async () => {
|
|
|
|
93
|
+ const { data } = await userInfoApi()
|
|
|
|
94
|
+ state.userInfo = data.user
|
|
58
|
}
|
95
|
}
|
|
59
|
-
|
|
|
|
60
|
- .content-box {
|
|
|
|
61
|
- flex: 1;
|
|
|
|
62
|
- overflow-y: auto;
|
|
|
|
63
|
- background-image: url('~@/static/bottomBg.png');
|
|
|
|
64
|
- background-repeat: no-repeat;
|
|
|
|
65
|
- background-size: 100% auto;
|
96
|
+
|
|
|
|
97
|
+ const getMyStudents = async () => {
|
|
|
|
98
|
+ const { data } = await myStudentsApi()
|
|
|
|
99
|
+ state.students = data.students
|
|
66
|
}
|
100
|
}
|
|
67
|
|
101
|
|
|
68
|
- .content-padding {
|
|
|
|
69
|
- padding: 0 28rpx;
|
102
|
+ const getuserSignUpList = async () => {
|
|
|
|
103
|
+ const { data } = await userSignUpListApi()
|
|
|
|
104
|
+ console.log(data)
|
|
|
|
105
|
+ state.signupList = data.signupList
|
|
|
|
106
|
+ }
|
|
|
|
107
|
+</script>
|
|
|
|
108
|
+
|
|
|
|
109
|
+<style lang="scss" scoped>
|
|
|
|
110
|
+ .container {
|
|
|
|
111
|
+ background: linear-gradient(135deg, #d4d6fe 10%, #f6f7fb 90%);
|
|
|
|
112
|
+ background-color: red;
|
|
|
|
113
|
+ height: calc(100vh - var(--tab-bar-height));
|
|
|
|
114
|
+ display: flex;
|
|
|
|
115
|
+ flex-direction: column;
|
|
|
|
116
|
+ }
|
|
|
|
117
|
+
|
|
|
|
118
|
+ .content-box {
|
|
|
|
119
|
+ flex: 1;
|
|
|
|
120
|
+ overflow-y: auto;
|
|
|
|
121
|
+ padding: 0 30rpx;
|
|
|
|
122
|
+ display: flex;
|
|
|
|
123
|
+ flex-direction: column;
|
|
70
|
}
|
124
|
}
|
|
71
|
-
|
|
|
|
72
|
- .user-info {
|
|
|
|
73
|
- width: 100%;
|
|
|
|
74
|
- height: 440rpx;
|
|
|
|
75
|
- background-image: url('~@/static/my/information.png');
|
|
|
|
76
|
- background-repeat: no-repeat;
|
|
|
|
77
|
- background-size: 100% auto;
|
|
|
|
78
|
- background-position: bottom;
|
|
|
|
79
|
- background-color: transparent;
|
|
|
|
80
|
- position: relative;
|
|
|
|
81
|
-
|
|
|
|
82
|
- .center-avatar {
|
|
|
|
83
|
- position: absolute;
|
|
|
|
84
|
- top: 20rpx;
|
|
|
|
85
|
- left: 50%;
|
|
|
|
86
|
- transform: translateX(-50%);
|
|
|
|
87
|
- width: 34%;
|
|
|
|
88
|
- aspect-ratio: 1/1;
|
|
|
|
89
|
- background-color: #fff;
|
|
|
|
90
|
- border-radius: 50%;
|
|
|
|
91
|
-
|
|
|
|
92
|
- .center-inner {
|
|
|
|
93
|
- width: 100%;
|
|
|
|
94
|
- height: 100%;
|
|
|
|
95
|
- border-radius: 50%;
|
|
|
|
96
|
- overflow: hidden;
|
|
|
|
97
|
- }
|
|
|
|
98
|
- }
|
|
|
|
99
|
-
|
|
|
|
100
|
- .loginTo-btn {
|
|
|
|
101
|
- position: absolute;
|
|
|
|
102
|
- left: 50%;
|
|
|
|
103
|
- bottom: 60rpx;
|
|
|
|
104
|
- transform: translateX(-50%);
|
|
|
|
105
|
- color: #fff;
|
|
|
|
106
|
- font-size: 44rpx;
|
|
|
|
107
|
- }
|
125
|
+
|
|
|
|
126
|
+ .header {
|
|
|
|
127
|
+ display: flex;
|
|
|
|
128
|
+ justify-content: space-between;
|
|
|
|
129
|
+ padding: 0 20rpx;
|
|
108
|
}
|
130
|
}
|
|
109
|
-
|
|
|
|
110
|
- .nav-list {
|
|
|
|
111
|
- background-color: #fff;
|
|
|
|
112
|
- border-radius: 12rpx;
|
|
|
|
113
|
- box-shadow: 0 0 20rpx #eee;
|
|
|
|
114
|
- padding: 10rpx 20rpx;
|
|
|
|
115
|
- box-sizing: border-box;
|
|
|
|
116
|
- margin-top: 40rpx;
|
|
|
|
117
|
-
|
|
|
|
118
|
- .nav-item {
|
|
|
|
119
|
- display: flex;
|
|
|
|
120
|
- justify-content: space-between;
|
|
|
|
121
|
- border-bottom: 2rpx dashed #d8d8d8;
|
|
|
|
122
|
- padding: 30rpx 0;
|
|
|
|
123
|
-
|
|
|
|
124
|
- &:last-child {
|
|
|
|
125
|
- border: none;
|
|
|
|
126
|
- }
|
|
|
|
127
|
- }
|
131
|
+
|
|
|
|
132
|
+ .avatar {
|
|
|
|
133
|
+ flex-shrink: 0;
|
|
|
|
134
|
+ width: 120rpx;
|
|
|
|
135
|
+ height: 120rpx;
|
|
|
|
136
|
+ border-radius: 50%;
|
|
|
|
137
|
+ background-color: #c1cdff;
|
|
128
|
}
|
138
|
}
|
|
|
|
139
|
+
|
|
|
|
140
|
+ .fm-box {
|
|
|
|
141
|
+ margin-left: 30rpx;
|
|
|
|
142
|
+ flex: 1;
|
|
|
|
143
|
+ display: flex;
|
|
|
|
144
|
+ flex-direction: column;
|
|
|
|
145
|
+ justify-content: space-between;
|
|
|
|
146
|
+ padding: 6rpx 0;
|
|
|
|
147
|
+ }
|
|
129
|
</style> |
148
|
</style> |