Skip to content

Commit d01e0e7

Browse files
Merge pull request #45 from full-ownership/master
feat : 가격필터링
2 parents 59cb09e + f6da4ce commit d01e0e7

26 files changed

+962
-294
lines changed

.env

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

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535

3636
# 종속성 재설치
3737
npm install
38+
npm install vue-simple-range-slider
39+
3840

3941
- name: Build the Vue app
4042
run: npm run build

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<link rel="icon" href="/favicon.ico">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Vite App</title>
7+
<title>Newjeaps</title>
88
</head>
99
<body>
1010
<div id="app"></div>

package-lock.json

Lines changed: 74 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"lint": "eslint . --fix"
1111
},
1212
"dependencies": {
13+
"@vueform/slider": "^2.1.10",
1314
"aos": "^2.3.4",
1415
"axios": "^1.7.7",
1516
"dotenv": "^16.4.5",
@@ -21,7 +22,9 @@
2122
"typed.js": "^2.1.0",
2223
"vue": "^3.5.12",
2324
"vue-fullpage.js": "^0.2.20",
25+
"vue-range-slider": "^0.6.0",
2426
"vue-router": "^4.4.5",
27+
"vue-simple-range-slider": "^1.1.0",
2528
"vue-typer": "^1.2.0",
2629
"vue3-kakao-maps": "^2.3.10"
2730
},

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import ChatbotButton from './Component/Chatbot/ChatbotButton.vue'
1313
<!-- <HeaderView /> -->
1414
<HeaderView />
1515
<MainView />
16-
<FooterView />
16+
1717
</div>
1818
</template>
1919
<style scoped>

src/Component/Notice/FAQList.vue

Lines changed: 27 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,51 @@
1+
<script setup>
2+
import {useFaqStore} from '@/stores/faq';
3+
import { useRouter } from 'vue-router';
4+
5+
const router = useRouter();
6+
const faqStore = useFaqStore();
7+
8+
faqStore.fetchFaqs();
9+
10+
const goToDetail = (faqId) => {
11+
router.push(`/notice/faqDetail/${faqId}`);
12+
}
13+
14+
15+
</script>
16+
117
<template>
218
<div class="p-6 bg-gray-100 min-h-screen">
3-
<!-- 공지사항 제목 및 더보기 -->
19+
<!-- 제목 및 검색 -->
420
<div class="flex justify-between items-center mb-6">
5-
<h2 class="text-xl font-bold text-gray-800">최신뉴스</h2>
6-
<a href="#" class="text-sm text-blue-500 hover:underline">더보기</a>
21+
<h2 class="text-xl font-bold text-gray-800">자주 묻는 질문</h2>
722
</div>
823

924
<!-- 공지사항 리스트 -->
1025
<ul class="space-y-6">
1126
<li
12-
v-for="notice in paginatedNotices"
13-
:key="notice.id"
27+
v-for="faq in faqStore.faqs"
28+
:key="faq.faqId"
1429
class="neumorphic-card p-4 rounded-lg transition-all duration-300 hover:shadow-lg"
30+
@click="goToDetail(faq.faqId)"
1531
>
1632
<div>
1733
<!-- 공지사항 제목 -->
18-
<p class="text-lg font-bold text-gray-900">{{ notice.title }}</p>
19-
<!-- 카테고리 및 날짜 -->
20-
<div class="flex justify-between text-sm text-gray-500 mt-2">
21-
<span>{{ notice.category }}</span>
22-
<span>{{ notice.date }}</span>
23-
</div>
24-
<!-- 공지사항 내용 -->
25-
<p class="text-sm text-gray-700 mt-3">{{ notice.description }}</p>
34+
<p class="text-lg font-bold text-gray-900">{{ faq.question }}</p>
35+
<!-- 작성일 및 조회수 -->
2636
</div>
2737
</li>
2838
</ul>
2939

3040
<!-- 페이지네이션 -->
3141
<div class="flex justify-center mt-8 space-x-4">
3242
<button
33-
v-for="page in totalPages"
43+
v-for="page in faqStore.pagination.totalPages"
3444
:key="page"
35-
@click="currentPage = page"
45+
@click="faqStore.setPage(page)"
3646
:class="{
37-
'neumorphic-button-active': currentPage === page,
38-
'neumorphic-button': currentPage !== page,
47+
'neumorphic-button-active': faqStore.pagination.currentPage === page,
48+
'neumorphic-button': faqStore.pagination.currentPage !== page,
3949
}"
4050
class="px-4 py-2 rounded-lg text-sm font-bold transition-all duration-300 hover:shadow-lg active:shadow-inner"
4151
>
@@ -45,76 +55,6 @@
4555
</div>
4656
</template>
4757

48-
<script setup>
49-
import { ref, computed } from "vue";
50-
51-
// 공지사항 더미 데이터
52-
const notices = ref([
53-
{
54-
id: 1,
55-
title: "서비스 점검 안내",
56-
category: "시스템 점검",
57-
date: "2024-11-21",
58-
description: "11월 23일 오전 2시부터 6시까지 시스템 점검이 예정되어 있습니다.",
59-
},
60-
{
61-
id: 2,
62-
title: "신규 기능 업데이트",
63-
category: "공지",
64-
date: "2024-11-20",
65-
description: "새로운 대시보드 기능이 추가되었습니다. 많은 이용 부탁드립니다.",
66-
},
67-
{
68-
id: 3,
69-
title: "이용약관 변경 안내",
70-
category: "법적 안내",
71-
date: "2024-11-15",
72-
description: "12월 1일부터 적용되는 새로운 이용약관을 확인해주세요.",
73-
},
74-
{
75-
id: 4,
76-
title: "회원 가입 이벤트",
77-
category: "이벤트",
78-
date: "2024-11-10",
79-
description: "회원 가입 이벤트가 진행 중입니다. 지금 가입하고 특별한 혜택을 받아보세요!",
80-
},
81-
{
82-
id: 5,
83-
title: "긴급 공지: 서비스 장애 복구",
84-
category: "긴급 공지",
85-
date: "2024-11-05",
86-
description: "서버 장애로 인해 불편을 끼쳐드려 죄송합니다. 현재 복구 작업이 완료되었습니다.",
87-
},
88-
{
89-
id: 6,
90-
title: "신규 서버 배포",
91-
category: "시스템 점검",
92-
date: "2024-11-03",
93-
description: "신규 서버가 성공적으로 배포되었습니다. 성능이 향상되었습니다.",
94-
},
95-
{
96-
id: 7,
97-
title: "보안 업데이트",
98-
category: "보안",
99-
date: "2024-10-28",
100-
description: "중요 보안 패치가 적용되었습니다. 최신 버전을 확인해주세요.",
101-
},
102-
]);
103-
104-
// 페이지네이션 상태
105-
const currentPage = ref(1); // 현재 페이지
106-
const itemsPerPage = ref(3); // 페이지당 항목 수
107-
108-
// 페이지네이션 계산
109-
const totalPages = computed(() => Math.ceil(notices.value.length / itemsPerPage.value));
110-
111-
// 현재 페이지에 해당하는 공지사항만 필터링
112-
const paginatedNotices = computed(() => {
113-
const start = (currentPage.value - 1) * itemsPerPage.value;
114-
const end = start + itemsPerPage.value;
115-
return notices.value.slice(start, end);
116-
});
117-
</script>
11858

11959
<style scoped>
12060
/* 뉴모피즘 카드 스타일 */

src/Component/Notice/MainInfo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const searchNotices = () => {
2121
2222
//디테일 가즈아
2323
const goToDetail = (noticeId) => {
24-
router.push(`/notice/${noticeId}`);
24+
router.push(`/notice/noticeDetail/${noticeId}`);
2525
}
2626
2727
</script>

src/Component/Notice/TabBar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@click="$emit('changeTab', tab.id)"
77
:class="[
88
'px-6 py-2 font-medium',
9-
activeTab === tab.id ? 'border-b-2 border-black text-black' : 'text-gray-500',
9+
activeTab === tab.id ? 'border-b-4 border-[#5995ED] text-black' : 'text-gray-500',
1010
]"
1111
class="transition"
1212
>

0 commit comments

Comments
 (0)