

240823 권민수 학생 로그인 시 side컴포넌트에서 해당 학생 정보 받아오도록 설정
@4a002f678e51a6a4ba34c03c4679fc9c3994d04d
--- client/views/layout/Side.vue
+++ client/views/layout/Side.vue
... | ... | @@ -80,6 +80,12 @@ |
80 | 80 |
}; |
81 | 81 |
}, |
82 | 82 |
methods: { |
83 |
+ pageSetting() { |
|
84 |
+ this.userId = this.$store.getters.getUserInfo.userId; |
|
85 |
+ console.log("유저 아이디: ", this.userId); |
|
86 |
+ this.fetchStudentInfo(); |
|
87 |
+ }, |
|
88 |
+ |
|
83 | 89 |
// 학생 정보를 가져오는 메서드 |
84 | 90 |
fetchStudentInfo() { |
85 | 91 |
axios |
... | ... | @@ -146,7 +152,7 @@ |
146 | 152 |
}, |
147 | 153 |
mounted() { |
148 | 154 |
console.log("Side mounted"); |
149 |
- this.fetchStudentInfo(); |
|
155 |
+ this.pageSetting(); |
|
150 | 156 |
}, |
151 | 157 |
}; |
152 | 158 |
</script> |
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?