

240823 권지수 Main_p 학습시간 랭킹
@560e0cc02baf566e49375c774c7f49bf5f237d00
--- client/views/pages/parents/Main_p.vue
+++ client/views/pages/parents/Main_p.vue
... | ... | @@ -60,7 +60,7 @@ |
60 | 60 |
<p class="title1" style="color: #fff;">점수 랭킹</p> |
61 | 61 |
</div> |
62 | 62 |
<div class="box"> |
63 |
- <P class="title2 mt10">현재 {{ stdCount }}명 중 <em class="blue">{{score_rank}}등</em>입니다.</P> |
|
63 |
+ <P class="title2 mt10">현재 {{ stdCount }}명 중 <em class="blue">{{ score_rank }}등</em>입니다.</P> |
|
64 | 64 |
</div> |
65 | 65 |
</div> |
66 | 66 |
<div class="textbook book-navy"> |
... | ... | @@ -68,7 +68,7 @@ |
68 | 68 |
<p class="title1" style="color: #fff;">학습시간 랭킹</p> |
69 | 69 |
</div> |
70 | 70 |
<div class="box"> |
71 |
- <P class="title2 mt10">현재 30명 중 <em class="navy">2등</em>입니다.</P> |
|
71 |
+ <P class="title2 mt10">현재 {{ stdCount }}명 중 <em class="navy">{{ time_rank }}등</em>입니다.</P> |
|
72 | 72 |
</div> |
73 | 73 |
</div> |
74 | 74 |
</div> |
... | ... | @@ -199,6 +199,7 @@ |
199 | 199 |
photo_rank: 0, |
200 | 200 |
problem_rank: 0, |
201 | 201 |
score_rank: 0, |
202 |
+ time_rank: 0, |
|
202 | 203 |
progress: 20, |
203 | 204 |
donutChartData: {}, |
204 | 205 |
currentDate: "2024-08-14", |
... | ... | @@ -278,6 +279,27 @@ |
278 | 279 |
.catch(function (error) { |
279 | 280 |
console.log("User Rank - error : ", error); |
280 | 281 |
alert("점수 랭킹 조회에 오류가 발생했습니다."); |
282 |
+ }); |
|
283 |
+ }, |
|
284 |
+ getUserRankByStudyTime: function () { |
|
285 |
+ const vm = this; |
|
286 |
+ axios({ |
|
287 |
+ url: "/userclass/getUserRankByStudyTime.json", |
|
288 |
+ method: "post", |
|
289 |
+ headers: { |
|
290 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
291 |
+ }, |
|
292 |
+ data: { |
|
293 |
+ userId: "1" // 로그인한 학생의 userId |
|
294 |
+ } |
|
295 |
+ }) |
|
296 |
+ .then(function (response) { |
|
297 |
+ console.log("User Rank - response : ", response.data); |
|
298 |
+ vm.time_rank = response.data; |
|
299 |
+ }) |
|
300 |
+ .catch(function (error) { |
|
301 |
+ console.log("User Rank - error : ", error); |
|
302 |
+ alert("학습시간 랭킹 조회에 오류가 발생했습니다."); |
|
281 | 303 |
}); |
282 | 304 |
}, |
283 | 305 |
problemRankByProblemData: function () { |
... | ... | @@ -363,6 +385,7 @@ |
363 | 385 |
this.photoRankByLikeData(); |
364 | 386 |
this.getUserRankByScore(); |
365 | 387 |
this.problemRankByProblemData(); |
388 |
+ this.getUserRankByStudyTime(); |
|
366 | 389 |
} |
367 | 390 |
|
368 | 391 |
} |
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?