From c3231c59ac5b8c9c61955676a80cb8d3f125e764 Mon Sep 17 00:00:00 2001 From: sb Date: Sat, 11 Jul 2026 19:15:41 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=8F=84=EC=B0=A9=20=EB=B2=84=ED=8A=BC?= =?UTF-8?q?=20=EC=95=84=EB=9E=98=20'=EC=9D=B4=20=EC=8B=9C=EA=B0=84?= =?UTF-8?q?=EB=8C=80=20=EC=9E=90=EC=A3=BC=20=EB=B3=B4=EC=9D=B4=EB=8A=94=20?= =?UTF-8?q?=EA=B2=AC=EC=A2=85'=20=ED=95=9C=20=EC=A4=84=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- src/api/spots.ts | 2 ++ src/pages/HomePage.vue | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/api/spots.ts b/src/api/spots.ts index 0a37476..0892905 100644 --- a/src/api/spots.ts +++ b/src/api/spots.ts @@ -42,6 +42,8 @@ export const spotsApi = { http.get(`/api/spots/${spotId}/mates${userId ? `?userId=${userId}` : ''}`), aiMates: (spotId: number, dogId: number) => http.get(`/api/spots/${spotId}/ai-mates?dogId=${dogId}`), + frequentBreeds: (spotId: number) => + http.get<{ breeds: string[] }>(`/api/spots/${spotId}/frequent-breeds`), reviews: (spotId: number) => http.get(`/api/spots/${spotId}/reviews`), checkIn: (spotId: number, userId: number, dogId: number) => http.post(`/api/spots/${spotId}/checkins`, { userId, dogId }), diff --git a/src/pages/HomePage.vue b/src/pages/HomePage.vue index 9c30e89..89b24ca 100644 --- a/src/pages/HomePage.vue +++ b/src/pages/HomePage.vue @@ -23,6 +23,15 @@ @click="onCheckIn" /> + +
+ + 이 시간대 자주 보이는 견종 · {{ frequentBreeds.join(', ') }} +
+
@@ -131,6 +140,7 @@ const spots = ref([]) const currentSpot = ref(null) const reviews = ref([]) const mates = ref([]) +const frequentBreeds = ref([]) const checkedIn = ref(false) const checkingIn = ref(false) const matchingDogId = ref(null) @@ -169,12 +179,14 @@ async function onSelectSpot(spotId: number) { } async function refreshSpot(spotId: number) { - const [r, m] = await Promise.all([ + const [r, m, fb] = await Promise.all([ spotsApi.reviews(spotId), spotsApi.mates(spotId, currentUserId()), + spotsApi.frequentBreeds(spotId), ]) reviews.value = r mates.value = m + frequentBreeds.value = fb.breeds } async function onCheckIn() {