From 56255c0ae60558ef1998892fd2caf0f6f94e5ca5 Mon Sep 17 00:00:00 2001 From: sb Date: Sat, 11 Jul 2026 13:44:46 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=B2=B4=ED=81=AC=EC=9D=B8=20=ED=9B=84?= =?UTF-8?q?=20AI=20=EA=B6=81=ED=95=A9=20=EC=B6=94=EC=B2=9C=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 체크인 성공 시 /api/spots/{id}/ai-mates 를 호출해 사이좋게 지낼 만한 강아지를 궁합점수·이유와 함께 표시. 로딩 스피너·빈 상태 처리 포함. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/api/spots.ts | 10 ++++++++ src/pages/HomePage.vue | 54 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/src/api/spots.ts b/src/api/spots.ts index ebd3b69..e2acdf6 100644 --- a/src/api/spots.ts +++ b/src/api/spots.ts @@ -14,6 +14,14 @@ export interface Mate { breed: string | null } +export interface AiMate { + dogId: number + name: string + breed: string | null + score: number + reason: string +} + export interface Review { id: number tag: string | null @@ -31,6 +39,8 @@ export interface CheckInResult { export const spotsApi = { list: () => http.get('/api/spots'), mates: (spotId: number) => http.get(`/api/spots/${spotId}/mates`), + aiMates: (spotId: number, dogId: number) => + http.get(`/api/spots/${spotId}/ai-mates?dogId=${dogId}`), 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 0126a9b..8ecbb18 100644 --- a/src/pages/HomePage.vue +++ b/src/pages/HomePage.vue @@ -46,6 +46,36 @@ :spot-name="currentSpot.name" /> + +
+
+ AI 궁합 추천 +
+
+ + 사이좋게 지낼 강아지를 찾는 중… +
+ +
+
{{ currentSpot ? currentSpot.name : '스팟' }} · 오늘의 한줄평 @@ -94,7 +124,7 @@