From 9426f03cc83ed4f3265f9e352172f4ccd00e26a9 Mon Sep 17 00:00:00 2001 From: bum12ark Date: Thu, 10 Mar 2022 10:43:38 +0900 Subject: [PATCH] =?UTF-8?q?feat(customer-vue):=20=EC=95=8C=EB=A6=BC=20?= =?UTF-8?q?=EC=B2=B4=ED=81=AC=EB=B0=95=EC=8A=A4=20=EB=B0=8F=20=EA=B0=9C?= =?UTF-8?q?=EC=88=98=20=ED=99=94=EB=A9=B4=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 알림 페이지 체크박스 클릭 시 읽음 처리 및 읽음 해제 처리 - App bar 읽지 않은 알림 개수 표시 - 알림 읽었을 시에 앱바 알림 개수 연동 --- customer-vue/src/api/notification.js | 14 ++++++++++-- customer-vue/src/components/AppNavigation.vue | 14 +++--------- customer-vue/src/views/Layout/HomeLayout.vue | 22 +++++++++++++++++-- customer-vue/src/views/NotificationView.vue | 19 +++++++++++----- 4 files changed, 49 insertions(+), 20 deletions(-) diff --git a/customer-vue/src/api/notification.js b/customer-vue/src/api/notification.js index 12440df..f0c753b 100644 --- a/customer-vue/src/api/notification.js +++ b/customer-vue/src/api/notification.js @@ -1,9 +1,19 @@ import axios from "axios"; -const url = process.env.VUE_APP_CUSTOMER_SERVICE_BASEURL + "/notification-service/notification"; +const url = process.env.VUE_APP_CUSTOMER_SERVICE_BASEURL + "/notification-service"; export default { requestNotification() { - return axios.get(url); + return axios.get(url + "/notifications"); + }, + patchNotification(id, isRead) { + const body = { + read: isRead + } + + return axios.patch(url + "/notification/" + id, body) + }, + countsNotification() { + return axios.get(url + "/api/notification/counts"); } } \ No newline at end of file diff --git a/customer-vue/src/components/AppNavigation.vue b/customer-vue/src/components/AppNavigation.vue index b75d874..a6456a2 100644 --- a/customer-vue/src/components/AppNavigation.vue +++ b/customer-vue/src/components/AppNavigation.vue @@ -20,8 +20,8 @@ @click="goNotification" > @@ -34,17 +34,9 @@ diff --git a/customer-vue/src/views/NotificationView.vue b/customer-vue/src/views/NotificationView.vue index 712b2c1..6f3f810 100644 --- a/customer-vue/src/views/NotificationView.vue +++ b/customer-vue/src/views/NotificationView.vue @@ -16,13 +16,13 @@ @@ -35,7 +35,7 @@