Skip to content

Commit 9482a85

Browse files
Merge pull request #43 from full-ownership/feature/login
fix : cors
2 parents 8804a35 + 65bdc7c commit 9482a85

File tree

7 files changed

+54
-47
lines changed

7 files changed

+54
-47
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VITE_API_BASE_URL=http://211.117.197.184:70
1+
VITE_API_BASE_URL=https://back.newjeaps.com

src/stores/mapCard.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export const useHouseInfoStore = defineStore('houseInfo', {
1010
async fetchHouseInfo(type) {
1111
try {
1212
// URL을 BASE_URL과 합쳐서 사용
13-
13+
console.log("맵카드")
14+
console.log(apiClient)
1415
const response = await apiClient.get(`/api/houseinfos/${type}`);
1516
// response.data.data를 houseInfos에 할당 (주요 수정 부분)
1617
this.houseInfos= response.data.data;

src/stores/sliderStore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineStore } from "pinia";
2+
3+
export const useSliderStore = defineStore("slider", {
4+
state: () => ({
5+
range: [10, 1000], // 초기 최소/최대 값
6+
}),
7+
actions: {
8+
updateRange(newRange) {
9+
this.range = newRange;
10+
},
11+
},
12+
});

src/stores/userStore.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const useUserStore = defineStore('userInfo', {
1010
async fetchUserInfo() {
1111
try {
1212
// URL을 BASE_URL과 합쳐서 사용
13+
console.log("userStore 동작")
1314
const response = await apiClient.get(`/api/members/nickname`);
1415
// response.data.data를 houseInfos에 할당 (주요 수정 부분)
1516
this.userInfos.data = response.data.data;

src/views/LoginView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const router = useRouter();
1111
1212
// Google OAuth2 인증 URL로 리다이렉트
1313
const redirectToGoogleAuth = () => {
14-
const googleAuthUrl = 'http://localhost:8080/api/oauth2/authorize/google';
14+
const googleAuthUrl = 'https://back.newjeaps.com/api/oauth2/authorize/google';
1515
window.location.href = googleAuthUrl; // 해당 URL로 이동
1616
};
1717
</script>

src/views/MapView.vue

Lines changed: 36 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -206,17 +206,10 @@ document.addEventListener("DOMContentLoaded", () => {
206206
207207
// 슬라이더 값을 반응형으로 관리
208208
const state = reactive({
209-
value: [10, 100], // 범위 슬라이더의 두 값
209+
value: [10, 100],
210+
value2: [10, 100]
210211
});
211212
212-
// state.value가 변경될 때마다 콘솔에 값 출력
213-
watch(
214-
() => state.value,
215-
(newValue) => {
216-
console.log("선택한 값:", newValue);
217-
},
218-
{ deep: true }
219-
);
220213
</script>
221214

222215

@@ -298,21 +291,19 @@ watch(
298291
</svg>
299292
</button>
300293
<!-- 아이콘 -->
301-
<div class="bg-white absolute z-10 w-[200px] h-[120px] top-10 left-0 hidden border-2 border-gray-200" id="rangeSlider">
302-
<RangeSlider
294+
<div
295+
class="bg-white absolute z-10 w-[200px] h-[120px] top-10 left-0 border-2 border-gray-200"
296+
v-if="isSliderVisible">
297+
<RangeSlider
303298
v-model="state.value"
304-
style="width: 90%"
299+
style="width: 100%"
305300
exponential
306-
:max="10000"
307-
class="m-auto mt-[25px]"
308-
>
309-
<!-- 슬라이더 끝에 '$' 기호 표시 -->
301+
:max="1000000000">
310302
<template #suffix>만원</template>
311303
</RangeSlider>
312-
313-
314-
</div>
315-
304+
<span>{{ state.value[0] }} 만원</span> -
305+
<span>{{ state.value[1] }} 만원</span>
306+
</div>
316307
</div>
317308

318309
<button type="button" class="relative inline-block text-left ml-2 h-8 px-2 py-2 bg-white border border-gray-300 shadow-sm focus:ring-indigo-500">
@@ -333,10 +324,31 @@ watch(
333324
</div>
334325
<!-- 목록 영역 추가할 수 있습니다 -->
335326
<div class="p-2 overflow-auto">
336-
337-
338-
339-
327+
<div class="text-center mt-2">
328+
<!-- <span>최소: {{ state.value[0] }} 만원</span> -
329+
<span>최대: {{ state.value[1] }} 만원</span>
330+
331+
<span>최소: {{ state.value2[0] }} 만원</span> -
332+
<span>최대: {{ state.value2[1] }} 만원</span> -->
333+
<!-- <RangeSlider
334+
v-model="state.value"
335+
style="width: 100%"
336+
exponential
337+
:max="1000000000"
338+
>
339+
<template #suffix>만원</template>
340+
</RangeSlider> -->
341+
342+
<RangeSlider
343+
v-model="state.value2"
344+
style="width: 100%"
345+
exponential
346+
:max="1000000000"
347+
>
348+
<template #suffix>만원</template>
349+
</RangeSlider>
350+
</div>
351+
340352
<div v-for="house in houseInfos" :key="house.id">
341353
<CardView
342354
:id="house.id"
@@ -348,25 +360,6 @@ watch(
348360
:maxPropertyPrice="house.maxPropertyPrice"
349361
/>
350362
</div>
351-
352-
<!-- <div v-if="isLoading">
353-
데이터 로드 중...
354-
</div>
355-
<div v-else>
356-
<div v-for="(house, index) in houseInfos" :key="index">
357-
<CardView
358-
:id="house.id"
359-
:buildingUse="house.buildingUse"
360-
:buildingName="house.buildingName"
361-
:districtName="house.districtName"
362-
:legalName="house.legalName"
363-
:minPropertyPrice="house.minPropertyPrice"
364-
:maxPropertyPrice="house.maxPropertyPrice"
365-
/>
366-
</div>
367-
</div> -->
368-
369-
370363
</div>
371364
</div>
372365

vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default defineConfig({
1111
port: 3000,
1212
proxy: {
1313
'/api': {
14-
target: 'http://211.117.197.184:70', // 첫 번째 서버 주소
14+
target: 'https://back.newjeaps.com', // 첫 번째 서버 주소
1515
changeOrigin: true,
1616
secure: true, // https 사용하지 않는 경우 false로 설정
1717
rewrite: (path) => path.replace(/^\/api/, ''), // 프록시 경로를 적절히 수정

0 commit comments

Comments
 (0)