![](/assets/images/project_default_logo.png)
--- client/views/pages/main/MyPage.vue
+++ client/views/pages/main/MyPage.vue
... | ... | @@ -49,7 +49,7 @@ |
49 | 49 |
</div> |
50 | 50 |
</div> |
51 | 51 |
<div class="title-box flex justify-between mb20"> |
52 |
- <p class="title">가나다학생 랭킹</p> |
|
52 |
+ <p class="title">{{ studentInfo.studentName }} 학생 랭킹</p> |
|
53 | 53 |
</div> |
54 | 54 |
<div class=" mb30"> |
55 | 55 |
<div class=" flex " style="gap: 50px;"> |
... | ... | @@ -113,7 +113,15 @@ |
113 | 113 |
mdiMagnify: mdiMagnify, |
114 | 114 |
mdilArrowRight: mdilArrowRight, |
115 | 115 |
timer: "00:00", |
116 |
- progress: 20 |
|
116 |
+ progress: 20, |
|
117 |
+ studentInfo: { |
|
118 |
+ studentName: "", |
|
119 |
+ institutionName: "", |
|
120 |
+ grade: "", |
|
121 |
+ className: "", |
|
122 |
+ studentQuestion: "", |
|
123 |
+ history: [], |
|
124 |
+ }, |
|
117 | 125 |
} |
118 | 126 |
}, |
119 | 127 |
methods: { |
... | ... | @@ -138,7 +146,26 @@ |
138 | 146 |
alert("반 학생 수 조회에 오류가 발생했습니다."); |
139 | 147 |
}); |
140 | 148 |
}, |
141 |
- |
|
149 |
+ fetchStudentInfo() { |
|
150 |
+ const vm = this; |
|
151 |
+ axios({ |
|
152 |
+ url: "/studentInfo/getInfo.json", |
|
153 |
+ method: "post", |
|
154 |
+ headers: { |
|
155 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
156 |
+ }, |
|
157 |
+ data: { |
|
158 |
+ userId: "USID_000000000000002" // 로그인한 학생의 userId |
|
159 |
+ } |
|
160 |
+ }) |
|
161 |
+ .then((response) => { |
|
162 |
+ console.log(response.data); |
|
163 |
+ this.studentInfo = response.data; |
|
164 |
+ }) |
|
165 |
+ .catch((error) => { |
|
166 |
+ console.error("학생 정보 가져오기 실패:", error); |
|
167 |
+ }); |
|
168 |
+ }, |
|
142 | 169 |
photoRankByLikeData: function () { |
143 | 170 |
const vm = this; |
144 | 171 |
axios({ |
... | ... | @@ -260,6 +287,7 @@ |
260 | 287 |
}, |
261 | 288 |
mounted() { |
262 | 289 |
console.log('Main2 mounted'); |
290 |
+ this.fetchStudentInfo(); |
|
263 | 291 |
this.classStdCount(); |
264 | 292 |
this.photoRankByLikeData(); |
265 | 293 |
this.getUserRankByScore(); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?