fix: AI 추천 이미지 해상도 및 스타일 개선
- 썸네일(3KB) 대신 원본 이미지(33KB) 사용 - 테두리/배경 제거로 깔끔한 디자인 - text-align:center로 중앙 정렬 - 최대 크기 140px
This commit is contained in:
parent
0676c4f466
commit
467c0e91aa
@ -2421,15 +2421,15 @@ def api_get_recommendation(user_id):
|
||||
|
||||
product_name = rec['recommended_product']
|
||||
logging.info(f"[AI추천] 검색할 제품명: {product_name}")
|
||||
# 제품명으로 이미지 검색 (LIKE 검색으로 부분 매칭)
|
||||
# 제품명으로 이미지 검색 (LIKE 검색으로 부분 매칭) - 원본 이미지 사용
|
||||
img_cursor.execute("""
|
||||
SELECT thumbnail_base64 FROM product_images
|
||||
WHERE product_name LIKE ? AND thumbnail_base64 IS NOT NULL
|
||||
SELECT image_base64 FROM product_images
|
||||
WHERE product_name LIKE ? AND image_base64 IS NOT NULL
|
||||
LIMIT 1
|
||||
""", (f'%{product_name}%',))
|
||||
img_row = img_cursor.fetchone()
|
||||
if img_row:
|
||||
product_image = img_row['thumbnail_base64']
|
||||
product_image = img_row['image_base64']
|
||||
logging.info(f"[AI추천] 이미지 찾음: {len(product_image)} bytes")
|
||||
else:
|
||||
logging.info(f"[AI추천] 이미지 없음 (제품: {product_name})")
|
||||
|
||||
@ -466,9 +466,9 @@
|
||||
</div>
|
||||
<div style="padding:0 24px 32px;">
|
||||
<div style="text-align:center;padding:8px 0 20px;">
|
||||
<div id="rec-image-container" style="margin-bottom:16px;display:flex;justify-content:center;align-items:center;">
|
||||
<img id="rec-image" style="width:120px;height:120px;object-fit:contain;display:none;background:#f8f9fa;border-radius:16px;padding:8px;" alt="추천 제품">
|
||||
<div id="rec-emoji" style="font-size:48px;">💊</div>
|
||||
<div id="rec-image-container" style="margin-bottom:20px;text-align:center;">
|
||||
<img id="rec-image" style="max-width:140px;max-height:140px;object-fit:contain;display:none;" alt="추천 제품">
|
||||
<div id="rec-emoji" style="font-size:56px;">💊</div>
|
||||
</div>
|
||||
<div id="rec-message" style="color:#343a40;font-size:16px;font-weight:500;line-height:1.6;letter-spacing:-0.3px;margin-bottom:16px;"></div>
|
||||
<div id="rec-product" style="display:inline-block;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;font-size:14px;font-weight:600;padding:8px 20px;border-radius:20px;letter-spacing:-0.2px;"></div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user