AI 실거래가 추천 10개 프로토타입
This commit is contained in:
1 parent
cb5dd5f25f
commit
b1f8061811
8 files changed
+243
-18
No files matched your search
+22
-10
@@ -75,18 +75,25 @@ function displayResults(data) {
|
||||
// 실거래가 목록
|
||||
if (data.listings && data.listings.length > 0) {
|
||||
html += '<div class="listings-section">';
|
||||
html += `<h3>📊 실거래가 정보 (${data.count}건)</h3>`;
|
||||
html += '<div class="listings-container">';
|
||||
|
||||
// 최대 20개만 표시
|
||||
const displayCount = Math.min(data.listings.length, 20);
|
||||
for (let i = 0; i < displayCount; i++) {
|
||||
const item = data.listings[i];
|
||||
html += createListingCard(item);
|
||||
// 필터링 정보 표시
|
||||
if (data.filtered) {
|
||||
html += `<h3>🎯 AI 추천 매물 TOP ${data.count} (전체 ${data.total_count}건 중)</h3>`;
|
||||
html += '<p class="filter-info">AI가 요구사항과 가장 일치하는 매물을 선별했습니다.</p>';
|
||||
} else {
|
||||
html += `<h3>📊 실거래가 정보 (${data.total_count || data.count}건)</h3>`;
|
||||
}
|
||||
|
||||
if (data.listings.length > 20) {
|
||||
html += `<p class="more-info">... 외 ${data.listings.length - 20}건</p>`;
|
||||
html += '<div class="listings-container">';
|
||||
|
||||
// 매물 카드 표시
|
||||
for (let i = 0; i < data.listings.length; i++) {
|
||||
const item = data.listings[i];
|
||||
html += createListingCard(item, data.filtered);
|
||||
}
|
||||
|
||||
if (!data.filtered && data.total_count > data.count) {
|
||||
html += `<p class="more-info">... 외 ${data.total_count - data.count}건</p>`;
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
@@ -108,9 +115,14 @@ function displayResults(data) {
|
||||
}
|
||||
|
||||
// 실거래가 카드 생성
|
||||
function createListingCard(item) {
|
||||
function createListingCard(item, isFiltered = false) {
|
||||
let html = '<div class="listing-card">';
|
||||
|
||||
// 순위 표시 (필터링된 경우)
|
||||
if (isFiltered && item.rank) {
|
||||
html += `<div class="rank-badge">TOP ${item.rank}</div>`;
|
||||
}
|
||||
|
||||
// 제목 (아파트명 또는 주소)
|
||||
const title = item['아파트'] || item['법정동'] || '정보 없음';
|
||||
html += `<h4>${title}</h4>`;
|
||||
|
||||
@@ -272,4 +272,39 @@ header p {
|
||||
color: #888;
|
||||
margin-top: 20px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* 필터링 정보 */
|
||||
.filter-info {
|
||||
color: #667eea;
|
||||
font-size: 0.95em;
|
||||
margin-bottom: 15px;
|
||||
padding: 10px;
|
||||
background: #f0f3ff;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 순위 배지 */
|
||||
.rank-badge {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: 15px;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
padding: 5px 12px;
|
||||
border-radius: 15px;
|
||||
font-size: 0.85em;
|
||||
font-weight: bold;
|
||||
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
|
||||
}
|
||||
|
||||
.listing-card {
|
||||
position: relative;
|
||||
background: white;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 10px;
|
||||
padding: 15px;
|
||||
transition: all 0.3s;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
|
||||
}
|
||||
Reference in new issue
Block a user