Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : 가격필터링 #45

Merged
merged 23 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4d75024
Merge pull request #33 from full-ownership/feature/intro
femmefatalehaein Nov 21, 2024
bd9010d
Merge pull request #34 from full-ownership/master
femmefatalehaein Nov 21, 2024
0af9910
Merge pull request #35 from full-ownership/feature/map
femmefatalehaein Nov 21, 2024
e16d95d
fix : css about filtering
femmefatalehaein Nov 21, 2024
3199a17
Merge pull request #36 from full-ownership/feature/filter
femmefatalehaein Nov 21, 2024
d83fb78
fix : Update main.yml
femmefatalehaein Nov 21, 2024
d150ea5
Feat: FAQ
gomminjae Nov 22, 2024
ca11f92
Merge pull request #37 from full-ownership/feature/faq
gomminjae Nov 22, 2024
23b9d7e
Fix: Color
gomminjae Nov 22, 2024
ece5fff
Merge pull request #38 from full-ownership/fix/css
gomminjae Nov 22, 2024
febc471
feat: map
gomminjae Nov 22, 2024
66c6a28
Merge pull request #39 from full-ownership/feature/map
gomminjae Nov 22, 2024
8e702d0
feat: eamil
gomminjae Nov 22, 2024
1955e02
Merge pull request #40 from full-ownership/feature/email
gomminjae Nov 22, 2024
be59377
fix : google login url
femmefatalehaein Nov 24, 2024
4f018e5
Merge pull request #41 from full-ownership/feature/login
femmefatalehaein Nov 24, 2024
4c92ccf
fix : proxy
femmefatalehaein Nov 24, 2024
8804a35
Merge pull request #42 from full-ownership/feature/login
femmefatalehaein Nov 24, 2024
65bdc7c
fix : cors
femmefatalehaein Nov 24, 2024
9482a85
Merge pull request #43 from full-ownership/feature/login
femmefatalehaein Nov 24, 2024
819f7ca
feat : router 파라미터로 분기처리
femmefatalehaein Nov 24, 2024
ec127b3
feat : router 파라미터로 분기처리
femmefatalehaein Nov 24, 2024
f6da4ce
Merge pull request #44 from full-ownership/feature/router
femmefatalehaein Nov 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BASE_URL=http://localhost:8080/api
VITE_API_BASE_URL=https://back.newjeaps.com
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:

# 종속성 재설치
npm install
npm install vue-simple-range-slider


- name: Build the Vue app
run: npm run build
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
<title>Newjeaps</title>
</head>
<body>
<div id="app"></div>
Expand Down
92 changes: 74 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"lint": "eslint . --fix"
},
"dependencies": {
"@vueform/slider": "^2.1.10",
"aos": "^2.3.4",
"axios": "^1.7.7",
"dotenv": "^16.4.5",
Expand All @@ -21,7 +22,9 @@
"typed.js": "^2.1.0",
"vue": "^3.5.12",
"vue-fullpage.js": "^0.2.20",
"vue-range-slider": "^0.6.0",
"vue-router": "^4.4.5",
"vue-simple-range-slider": "^1.1.0",
"vue-typer": "^1.2.0",
"vue3-kakao-maps": "^2.3.10"
},
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import ChatbotButton from './Component/Chatbot/ChatbotButton.vue'
<!-- <HeaderView /> -->
<HeaderView />
<MainView />
<FooterView />

</div>
</template>
<style scoped>
Expand Down
114 changes: 27 additions & 87 deletions src/Component/Notice/FAQList.vue
Original file line number Diff line number Diff line change
@@ -1,41 +1,51 @@
<script setup>
import {useFaqStore} from '@/stores/faq';
import { useRouter } from 'vue-router';

const router = useRouter();
const faqStore = useFaqStore();

faqStore.fetchFaqs();

const goToDetail = (faqId) => {
router.push(`/notice/faqDetail/${faqId}`);
}


</script>

<template>
<div class="p-6 bg-gray-100 min-h-screen">
<!-- 공지사항 제목 및 더보기 -->
<!-- 제목 및 검색 -->
<div class="flex justify-between items-center mb-6">
<h2 class="text-xl font-bold text-gray-800">최신뉴스</h2>
<a href="#" class="text-sm text-blue-500 hover:underline">더보기</a>
<h2 class="text-xl font-bold text-gray-800">자주 묻는 질문</h2>
</div>

<!-- 공지사항 리스트 -->
<ul class="space-y-6">
<li
v-for="notice in paginatedNotices"
:key="notice.id"
v-for="faq in faqStore.faqs"
:key="faq.faqId"
class="neumorphic-card p-4 rounded-lg transition-all duration-300 hover:shadow-lg"
@click="goToDetail(faq.faqId)"
>
<div>
<!-- 공지사항 제목 -->
<p class="text-lg font-bold text-gray-900">{{ notice.title }}</p>
<!-- 카테고리 및 날짜 -->
<div class="flex justify-between text-sm text-gray-500 mt-2">
<span>{{ notice.category }}</span>
<span>{{ notice.date }}</span>
</div>
<!-- 공지사항 내용 -->
<p class="text-sm text-gray-700 mt-3">{{ notice.description }}</p>
<p class="text-lg font-bold text-gray-900">{{ faq.question }}</p>
<!-- 작성일 및 조회수 -->
</div>
</li>
</ul>

<!-- 페이지네이션 -->
<div class="flex justify-center mt-8 space-x-4">
<button
v-for="page in totalPages"
v-for="page in faqStore.pagination.totalPages"
:key="page"
@click="currentPage = page"
@click="faqStore.setPage(page)"
:class="{
'neumorphic-button-active': currentPage === page,
'neumorphic-button': currentPage !== page,
'neumorphic-button-active': faqStore.pagination.currentPage === page,
'neumorphic-button': faqStore.pagination.currentPage !== page,
}"
class="px-4 py-2 rounded-lg text-sm font-bold transition-all duration-300 hover:shadow-lg active:shadow-inner"
>
Expand All @@ -45,76 +55,6 @@
</div>
</template>

<script setup>
import { ref, computed } from "vue";

// 공지사항 더미 데이터
const notices = ref([
{
id: 1,
title: "서비스 점검 안내",
category: "시스템 점검",
date: "2024-11-21",
description: "11월 23일 오전 2시부터 6시까지 시스템 점검이 예정되어 있습니다.",
},
{
id: 2,
title: "신규 기능 업데이트",
category: "공지",
date: "2024-11-20",
description: "새로운 대시보드 기능이 추가되었습니다. 많은 이용 부탁드립니다.",
},
{
id: 3,
title: "이용약관 변경 안내",
category: "법적 안내",
date: "2024-11-15",
description: "12월 1일부터 적용되는 새로운 이용약관을 확인해주세요.",
},
{
id: 4,
title: "회원 가입 이벤트",
category: "이벤트",
date: "2024-11-10",
description: "회원 가입 이벤트가 진행 중입니다. 지금 가입하고 특별한 혜택을 받아보세요!",
},
{
id: 5,
title: "긴급 공지: 서비스 장애 복구",
category: "긴급 공지",
date: "2024-11-05",
description: "서버 장애로 인해 불편을 끼쳐드려 죄송합니다. 현재 복구 작업이 완료되었습니다.",
},
{
id: 6,
title: "신규 서버 배포",
category: "시스템 점검",
date: "2024-11-03",
description: "신규 서버가 성공적으로 배포되었습니다. 성능이 향상되었습니다.",
},
{
id: 7,
title: "보안 업데이트",
category: "보안",
date: "2024-10-28",
description: "중요 보안 패치가 적용되었습니다. 최신 버전을 확인해주세요.",
},
]);

// 페이지네이션 상태
const currentPage = ref(1); // 현재 페이지
const itemsPerPage = ref(3); // 페이지당 항목 수

// 페이지네이션 계산
const totalPages = computed(() => Math.ceil(notices.value.length / itemsPerPage.value));

// 현재 페이지에 해당하는 공지사항만 필터링
const paginatedNotices = computed(() => {
const start = (currentPage.value - 1) * itemsPerPage.value;
const end = start + itemsPerPage.value;
return notices.value.slice(start, end);
});
</script>

<style scoped>
/* 뉴모피즘 카드 스타일 */
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Notice/MainInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const searchNotices = () => {

//디테일 가즈아
const goToDetail = (noticeId) => {
router.push(`/notice/${noticeId}`);
router.push(`/notice/noticeDetail/${noticeId}`);
}

</script>
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Notice/TabBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@click="$emit('changeTab', tab.id)"
:class="[
'px-6 py-2 font-medium',
activeTab === tab.id ? 'border-b-2 border-black text-black' : 'text-gray-500',
activeTab === tab.id ? 'border-b-4 border-[#5995ED] text-black' : 'text-gray-500',
]"
class="transition"
>
Expand Down
Loading