From 7886d0b8d0b0c796d17e0c287836d4f33cd1f1f7 Mon Sep 17 00:00:00 2001 From: young-jii Date: Mon, 24 Jun 2024 11:13:26 +0900 Subject: [PATCH 1/2] [front] replace logo --- FRONT/src/assets/js/intro.js | 29 +++++++++++++++-------------- FRONT/src/components/MapView.vue | 9 ++++----- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/FRONT/src/assets/js/intro.js b/FRONT/src/assets/js/intro.js index 22a57920..c4731670 100644 --- a/FRONT/src/assets/js/intro.js +++ b/FRONT/src/assets/js/intro.js @@ -18,7 +18,7 @@ function getCookie(name) { export default { name: 'IntroPage', data() { - return { + return { message: '', csrfToken: null, }; @@ -27,17 +27,17 @@ export default { this.getCsrfToken().then(() => { this.fetchIntroData(); }); - this.$root.$socket.onmessage = (event) => { - console.log('WebSocket message received in IntroPage:', event.data); - }; + // this.$root.$socket.onmessage = (event) => { + // console.log('WebSocket message received in IntroPage:', event.data); + // }; }, methods: { async getCsrfToken() { const apiBaseUrl = this.$root.$apiBaseUrl; - console.log('---시작---') + console.log('---시작---'); console.log('IntroPage API Base URL:', apiBaseUrl); try { - const response = await axios.get(`${apiBaseUrl}/map/api/set-csrf-token/`, { withCredentials: true }); + const response = await axios.get(`${apiBaseUrl}/map/set-csrf-token/`, { withCredentials: true }); console.log('IntroPage CSRF token set successfully.'); console.log('IntroPage Response data:', response.data); @@ -59,16 +59,17 @@ export default { const apiBaseUrl = this.$root.$apiBaseUrl; console.log('Fetching intro data from:', `${apiBaseUrl}/main/api/intro/`); try { - const response = await fetch(`${apiBaseUrl}/main/api/intro/`); - if (!response.ok) { - throw new Error('Network response was not ok'); - } - const data = await response.json(); - console.log('IntroPage fetched data:', data); - this.message = data.message; + const response = await axios.get(`${apiBaseUrl}/main/api/intro/`, { + headers: { + 'X-CSRFToken': this.csrfToken + }, + withCredentials: true + }); + console.log('IntroPage fetched data:', response.data); + this.message = response.data.message; } catch (error) { console.error('Error fetching data:', error); } - }, + } } }; \ No newline at end of file diff --git a/FRONT/src/components/MapView.vue b/FRONT/src/components/MapView.vue index 236417f4..79bccaa0 100644 --- a/FRONT/src/components/MapView.vue +++ b/FRONT/src/components/MapView.vue @@ -55,14 +55,13 @@ - + + - - - + + - ODsay Logo
From 7f6019876af953cd8432ba4a1ce18a1517f43ea5 Mon Sep 17 00:00:00 2001 From: young-jii Date: Mon, 24 Jun 2024 11:17:26 +0900 Subject: [PATCH 2/2] Revert "[front] replace logo" This reverts commit 7886d0b8d0b0c796d17e0c287836d4f33cd1f1f7. --- FRONT/src/assets/js/intro.js | 29 ++++++++++++++--------------- FRONT/src/components/MapView.vue | 9 +++++---- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/FRONT/src/assets/js/intro.js b/FRONT/src/assets/js/intro.js index c4731670..22a57920 100644 --- a/FRONT/src/assets/js/intro.js +++ b/FRONT/src/assets/js/intro.js @@ -18,7 +18,7 @@ function getCookie(name) { export default { name: 'IntroPage', data() { - return { + return { message: '', csrfToken: null, }; @@ -27,17 +27,17 @@ export default { this.getCsrfToken().then(() => { this.fetchIntroData(); }); - // this.$root.$socket.onmessage = (event) => { - // console.log('WebSocket message received in IntroPage:', event.data); - // }; + this.$root.$socket.onmessage = (event) => { + console.log('WebSocket message received in IntroPage:', event.data); + }; }, methods: { async getCsrfToken() { const apiBaseUrl = this.$root.$apiBaseUrl; - console.log('---시작---'); + console.log('---시작---') console.log('IntroPage API Base URL:', apiBaseUrl); try { - const response = await axios.get(`${apiBaseUrl}/map/set-csrf-token/`, { withCredentials: true }); + const response = await axios.get(`${apiBaseUrl}/map/api/set-csrf-token/`, { withCredentials: true }); console.log('IntroPage CSRF token set successfully.'); console.log('IntroPage Response data:', response.data); @@ -59,17 +59,16 @@ export default { const apiBaseUrl = this.$root.$apiBaseUrl; console.log('Fetching intro data from:', `${apiBaseUrl}/main/api/intro/`); try { - const response = await axios.get(`${apiBaseUrl}/main/api/intro/`, { - headers: { - 'X-CSRFToken': this.csrfToken - }, - withCredentials: true - }); - console.log('IntroPage fetched data:', response.data); - this.message = response.data.message; + const response = await fetch(`${apiBaseUrl}/main/api/intro/`); + if (!response.ok) { + throw new Error('Network response was not ok'); + } + const data = await response.json(); + console.log('IntroPage fetched data:', data); + this.message = data.message; } catch (error) { console.error('Error fetching data:', error); } - } + }, } }; \ No newline at end of file diff --git a/FRONT/src/components/MapView.vue b/FRONT/src/components/MapView.vue index 79bccaa0..236417f4 100644 --- a/FRONT/src/components/MapView.vue +++ b/FRONT/src/components/MapView.vue @@ -55,13 +55,14 @@ - - + - - + + + + ODsay Logo