Compare commits

...

5 Commits

Author SHA1 Message Date
1128712170 Merge branch 'feature/video-official-site-overlay': 영상 종료 전 공식 링크 오버레이 2026-08-21 11:46:37 +09:00
e328fc950c feat: 업체 직접 입력 시 공식 홈페이지 링크 입력란 추가
- BusinessNameInputModal에 선택 입력 URL 필드 추가 (프로토콜 미입력 시 https:// 보정)
- onManualInput 콜백 체인(officialSiteUrl) 확장
- POST /marketing 요청 body에 official_site_url 전달 (미입력 시 null)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DKTAqpFj8pbWzgvq7MRDHk
2026-08-21 10:56:39 +09:00
547dd415c5 fix: 영상 링크 오버레이 문구를 '자세히 보기'로 변경
official_site_url이 네이버 플레이스/인스타그램 등 업체 대표 링크일 수 있어
중립적인 문구로 조정

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DKTAqpFj8pbWzgvq7MRDHk
2026-08-21 10:50:23 +09:00
cea60e70db feat: 영상 종료 3초 전 공식 홈페이지 링크 오버레이 표시
- VideoDetailItem/VideoListItem에 official_site_url 필드 추가
- 플레이어 onTimeUpdate로 잔여 3초 감지, 링크 카드 오버레이 노출
- official_site_url이 null이면 오버레이 미렌더링

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DKTAqpFj8pbWzgvq7MRDHk
2026-08-21 10:45:15 +09:00
0d3167c1a2 fix: 공유하기 수정 2026-08-20 16:35:17 +09:00
16 changed files with 178 additions and 49 deletions

View File

@ -354,14 +354,14 @@ const App: React.FC = () => {
}; };
// 업체명·주소 수동 입력으로 마케팅 분석 API 호출 // 업체명·주소 수동 입력으로 마케팅 분석 API 호출
const handleManualInput = async (businessName: string, address: string, category: string) => { const handleManualInput = async (businessName: string, address: string, category: string, officialSiteUrl?: string) => {
setAfterLoadTarget('generation_flow'); setAfterLoadTarget('generation_flow');
setViewMode('loading'); setViewMode('loading');
setIsAnalysisComplete(false); setIsAnalysisComplete(false);
setError(null); setError(null);
try { try {
const data = await marketingAnalysis(businessName, address, category); const data = await marketingAnalysis(businessName, address, category, officialSiteUrl);
if (!validateCrawlingResponse(data)) { if (!validateCrawlingResponse(data)) {
throw new Error(t('app.autocompleteError')); throw new Error(t('app.autocompleteError'));

View File

@ -5,7 +5,7 @@ import CitySelectModal, { REGIONS } from './CitySelectModal';
interface BusinessNameInputModalProps { interface BusinessNameInputModalProps {
onClose: () => void; onClose: () => void;
onSubmit: (businessName: string, address: string, category: string) => void; onSubmit: (businessName: string, address: string, category: string, officialSiteUrl: string) => void;
} }
const BusinessNameInputModal: React.FC<BusinessNameInputModalProps> = ({ onClose, onSubmit }) => { const BusinessNameInputModal: React.FC<BusinessNameInputModalProps> = ({ onClose, onSubmit }) => {
@ -14,6 +14,7 @@ const BusinessNameInputModal: React.FC<BusinessNameInputModalProps> = ({ onClose
const [selectedCity, setSelectedCity] = useState(''); const [selectedCity, setSelectedCity] = useState('');
const [detailAddress, setDetailAddress] = useState(''); const [detailAddress, setDetailAddress] = useState('');
const [category, setCategory] = useState(''); const [category, setCategory] = useState('');
const [officialSiteUrl, setOfficialSiteUrl] = useState('');
const [isCityModalOpen, setIsCityModalOpen] = useState(false); const [isCityModalOpen, setIsCityModalOpen] = useState(false);
useEffect(() => { useEffect(() => {
@ -42,7 +43,12 @@ const BusinessNameInputModal: React.FC<BusinessNameInputModalProps> = ({ onClose
const handleSubmit = () => { const handleSubmit = () => {
if (!isValid) return; if (!isValid) return;
const fullAddress = `${selectedCity} ${detailAddress.trim()}`; const fullAddress = `${selectedCity} ${detailAddress.trim()}`;
onSubmit(businessName.trim(), fullAddress, category.trim()); // 프로토콜 없이 입력하면 https:// 를 붙여서 전달
const trimmedUrl = officialSiteUrl.trim();
const normalizedUrl = trimmedUrl && !/^https?:\/\//i.test(trimmedUrl)
? `https://${trimmedUrl}`
: trimmedUrl;
onSubmit(businessName.trim(), fullAddress, category.trim(), normalizedUrl);
onClose(); onClose();
}; };
@ -118,6 +124,19 @@ const BusinessNameInputModal: React.FC<BusinessNameInputModalProps> = ({ onClose
/> />
</div> </div>
<div className="manual-modal-field">
<label className="manual-modal-label">{t('landing.hero.manualLabelSiteUrl')}</label>
<input
type="url"
className="manual-modal-input"
placeholder={t('landing.hero.manualPlaceholderSiteUrl')}
value={officialSiteUrl}
onChange={e => setOfficialSiteUrl(e.target.value)}
onKeyDown={handleKeyDown}
maxLength={2048}
/>
</div>
<div className="manual-modal-actions"> <div className="manual-modal-actions">
<button type="button" className="manual-modal-cancel" onClick={onClose}> <button type="button" className="manual-modal-cancel" onClick={onClose}>
{t('common.cancel')} {t('common.cancel')}

View File

@ -7,6 +7,7 @@ interface ContentCardSocialActionsProps {
videoId: number; videoId: number;
storeName: string; storeName: string;
region?: string; region?: string;
title?: string | null;
commentCount: number; commentCount: number;
initialLikeCount: number; initialLikeCount: number;
initialIsLiked?: boolean; initialIsLiked?: boolean;
@ -15,7 +16,7 @@ interface ContentCardSocialActionsProps {
const ContentCardSocialActions: React.FC<ContentCardSocialActionsProps> = ({ const ContentCardSocialActions: React.FC<ContentCardSocialActionsProps> = ({
videoId, videoId,
storeName, storeName,
region, title,
commentCount, commentCount,
initialLikeCount, initialLikeCount,
initialIsLiked = false, initialIsLiked = false,
@ -27,15 +28,13 @@ const ContentCardSocialActions: React.FC<ContentCardSocialActionsProps> = ({
const likeDebounceRef = useRef<ReturnType<typeof setTimeout> | null>(null); const likeDebounceRef = useRef<ReturnType<typeof setTimeout> | null>(null);
const shareUrl = buildVideoShareUrl(API_URL, videoId); const shareUrl = buildVideoShareUrl(API_URL, videoId);
const shareTitle = storeName || t('videoDetail.kakaoDefaultTitle'); const shareTitle = title || storeName || t('videoDetail.kakaoDefaultTitle');
const shareDescription = t('videoDetail.kakaoDescription', { region: region ?? '' });
const handleShareBtnClick = async (e: React.MouseEvent) => { const handleShareBtnClick = async (e: React.MouseEvent) => {
e.stopPropagation(); e.stopPropagation();
const handled = await tryNativeShare({ const handled = await tryNativeShare({
title: shareTitle, title: shareTitle,
text: shareDescription,
url: shareUrl, url: shareUrl,
}); });
if (handled) { if (handled) {

View File

@ -38,7 +38,7 @@ const extractUrl = (text: string): string | null => {
interface SearchInputFormProps { interface SearchInputFormProps {
onAnalyze?: (value: string, type: SearchType) => void; onAnalyze?: (value: string, type: SearchType) => void;
onAutocomplete?: (data: AutocompleteRequest) => void; onAutocomplete?: (data: AutocompleteRequest) => void;
onManualInput?: (businessName: string, address: string, category: string) => void; onManualInput?: (businessName: string, address: string, category: string, officialSiteUrl?: string) => void;
/** 직접입력 버튼 클릭 시 기본 동작(모달 열기)을 대체합니다. 제공 시 모달을 직접 관리해야 합니다. */ /** 직접입력 버튼 클릭 시 기본 동작(모달 열기)을 대체합니다. 제공 시 모달을 직접 관리해야 합니다. */
onManualButtonClick?: () => void; onManualButtonClick?: () => void;
error?: string | null; error?: string | null;
@ -340,9 +340,9 @@ const SearchInputForm: React.FC<SearchInputFormProps> = ({
{!onManualButtonClick && isManualModalOpen && ( {!onManualButtonClick && isManualModalOpen && (
<BusinessNameInputModal <BusinessNameInputModal
onClose={() => setIsManualModalOpen(false)} onClose={() => setIsManualModalOpen(false)}
onSubmit={(businessName, address, category) => { onSubmit={(businessName, address, category, officialSiteUrl) => {
setIsManualModalOpen(false); setIsManualModalOpen(false);
onManualInput?.(businessName, address, category); onManualInput?.(businessName, address, category, officialSiteUrl);
}} }}
/> />
)} )}

View File

@ -33,6 +33,7 @@ const VideoDetailContent: React.FC<VideoDetailContentProps> = ({ videoId, isModa
const [copied, setCopied] = useState(false); const [copied, setCopied] = useState(false);
const [isLandscape, setIsLandscape] = useState(false); const [isLandscape, setIsLandscape] = useState(false);
const [showSiteOverlay, setShowSiteOverlay] = useState(false);
const [showLoginModal, setShowLoginModal] = useState(false); const [showLoginModal, setShowLoginModal] = useState(false);
const [comments, setComments] = useState<CommentItem[]>([]); const [comments, setComments] = useState<CommentItem[]>([]);
@ -68,6 +69,7 @@ const VideoDetailContent: React.FC<VideoDetailContentProps> = ({ videoId, isModa
const fetchVideo = async () => { const fetchVideo = async () => {
setLoading(true); setLoading(true);
setError(null); setError(null);
setShowSiteOverlay(false);
try { try {
const data = await getVideoById(videoId); const data = await getVideoById(videoId);
setVideo(data); setVideo(data);
@ -103,26 +105,27 @@ const VideoDetailContent: React.FC<VideoDetailContentProps> = ({ videoId, isModa
}; };
const shareUrl = buildVideoShareUrl(API_URL, videoId); const shareUrl = buildVideoShareUrl(API_URL, videoId);
const shareTitle = video?.store_name ?? t('videoDetail.kakaoDefaultTitle'); const shareTitle = video?.title || video?.store_name || t('videoDetail.kakaoDefaultTitle');
const shareDescription = t('videoDetail.kakaoDescription', { region: video?.region ?? '' });
const handleCopyLink = async () => {
try {
await navigator.clipboard.writeText(shareUrl);
} catch {
// clipboard API 미지원 환경에서는 무시
}
setCopied(true);
setTimeout(() => setCopied(false), 2000);
};
const handleShareButtonClick = async () => { const handleShareButtonClick = async () => {
const handled = await tryNativeShare({ const handled = await tryNativeShare({
title: shareTitle, title: shareTitle,
text: shareDescription,
url: shareUrl, url: shareUrl,
}); });
if (handled) { if (handled) {
return; return;
} }
await handleCopyLink();
try {
await navigator.clipboard.writeText(shareUrl);
setCopied(true);
setTimeout(() => setCopied(false), 2000);
} catch {
// clipboard API 미지원 환경에서는 무시
}
}; };
const likeDebounceRef = React.useRef<ReturnType<typeof setTimeout> | null>(null); const likeDebounceRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);
@ -220,6 +223,7 @@ const VideoDetailContent: React.FC<VideoDetailContentProps> = ({ videoId, isModa
<div className="ado2-contents-error"><p>{error}</p></div> <div className="ado2-contents-error"><p>{error}</p></div>
) : video ? ( ) : video ? (
<div className={`video-detail-content ${isLandscape ? 'landscape' : ''}`}> <div className={`video-detail-content ${isLandscape ? 'landscape' : ''}`}>
<div className="video-detail-player-wrap">
<video <video
src={video.result_movie_url} src={video.result_movie_url}
controls controls
@ -231,7 +235,34 @@ const VideoDetailContent: React.FC<VideoDetailContentProps> = ({ videoId, isModa
const v = e.currentTarget; const v = e.currentTarget;
setIsLandscape(v.videoWidth > v.videoHeight); setIsLandscape(v.videoWidth > v.videoHeight);
}} }}
onTimeUpdate={(e) => {
if (!video.official_site_url) return;
const v = e.currentTarget;
// 영상 종료 3초 전부터 공식 홈페이지 오버레이 노출
setShowSiteOverlay(
Number.isFinite(v.duration) && v.duration - v.currentTime <= 3
);
}}
/> />
{video.official_site_url && showSiteOverlay && (
<a
href={video.official_site_url}
target="_blank"
rel="noopener noreferrer"
className="video-site-overlay"
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
<circle cx="12" cy="12" r="10"/>
<line x1="2" y1="12" x2="22" y2="12"/>
<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>
</svg>
<span className="video-site-overlay-text">
<strong>{video.store_name}</strong>
{t('videoDetail.siteOverlayLabel')}
</span>
</a>
)}
</div>
<div className="video-detail-info"> <div className="video-detail-info">
<h2 className="video-detail-store">{video.store_name}</h2> <h2 className="video-detail-store">{video.store_name}</h2>
@ -252,6 +283,7 @@ const VideoDetailContent: React.FC<VideoDetailContentProps> = ({ videoId, isModa
<button <button
className="video-detail-copy-btn" className="video-detail-copy-btn"
onClick={handleShareButtonClick} onClick={handleShareButtonClick}
title={t('videoDetail.share')}
> >
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
<circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/> <circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/>

View File

@ -208,7 +208,9 @@
"manualPlaceholderAddress": "Enter the address", "manualPlaceholderAddress": "Enter the address",
"manualPlaceholderRegion": "Select a region", "manualPlaceholderRegion": "Select a region",
"manualPlaceholderDetail": "Enter detail address (e.g. Gangnam-gu Teheran-ro 123)", "manualPlaceholderDetail": "Enter detail address (e.g. Gangnam-gu Teheran-ro 123)",
"manualPlaceholderCategory": "Enter the business category (e.g. pension, cafe, salon)" "manualPlaceholderCategory": "Enter the business category (e.g. pension, cafe, salon)",
"manualLabelSiteUrl": "Website link (optional)",
"manualPlaceholderSiteUrl": "Enter the official website URL (e.g. https://example.com)"
}, },
"welcome": { "welcome": {
"title": "Welcome to ADO2.AI", "title": "Welcome to ADO2.AI",
@ -624,6 +626,7 @@
"closeAriaLabel": "Close", "closeAriaLabel": "Close",
"share": "Share", "share": "Share",
"copied": "Copied!", "copied": "Copied!",
"siteOverlayLabel": "View more",
"shareKakao": "KakaoTalk", "shareKakao": "KakaoTalk",
"shareFacebook": "Facebook", "shareFacebook": "Facebook",
"shareTwitter": "X (Twitter)", "shareTwitter": "X (Twitter)",

View File

@ -207,7 +207,9 @@
"manualPlaceholderAddress": "주소를 입력하세요.", "manualPlaceholderAddress": "주소를 입력하세요.",
"manualPlaceholderRegion": "지역을 선택하세요.", "manualPlaceholderRegion": "지역을 선택하세요.",
"manualPlaceholderDetail": "상세 주소를 입력하세요. (예: 강남구 테헤란로 123)", "manualPlaceholderDetail": "상세 주소를 입력하세요. (예: 강남구 테헤란로 123)",
"manualPlaceholderCategory": "업종을 입력하세요. (예: 펜션, 카페, 미용실)" "manualPlaceholderCategory": "업종을 입력하세요. (예: 펜션, 카페, 미용실)",
"manualLabelSiteUrl": "홈페이지 링크 (선택)",
"manualPlaceholderSiteUrl": "공식 홈페이지 주소를 입력하세요. (예: https://example.com)"
}, },
"welcome": { "welcome": {
"title": "ADO2.AI에 오신 것을 환영합니다.", "title": "ADO2.AI에 오신 것을 환영합니다.",
@ -623,6 +625,7 @@
"closeAriaLabel": "닫기", "closeAriaLabel": "닫기",
"share": "공유하기", "share": "공유하기",
"copied": "복사됨!", "copied": "복사됨!",
"siteOverlayLabel": "자세히 보기",
"shareKakao": "카카오톡", "shareKakao": "카카오톡",
"shareFacebook": "페이스북", "shareFacebook": "페이스북",
"shareTwitter": "X (트위터)", "shareTwitter": "X (트위터)",

View File

@ -194,6 +194,7 @@ const ADO2ContentsPage: React.FC<ADO2ContentsPageProps> = () => {
videoId={video.video_id} videoId={video.video_id}
storeName={video.store_name} storeName={video.store_name}
region={video.region} region={video.region}
title={video.title}
commentCount={video.comment_count ?? 0} commentCount={video.comment_count ?? 0}
initialLikeCount={video.like_count ?? 0} initialLikeCount={video.like_count ?? 0}
initialIsLiked={video.is_liked_by_me} initialIsLiked={video.is_liked_by_me}

View File

@ -299,13 +299,13 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
}; };
// 업체명·주소 수동 입력으로 마케팅 분석 API 호출 // 업체명·주소 수동 입력으로 마케팅 분석 API 호출
const handleManualInput = async (businessName: string, address: string, category: string) => { const handleManualInput = async (businessName: string, address: string, category: string, officialSiteUrl?: string) => {
goToWizardStep(-1); goToWizardStep(-1);
setIsAnalysisComplete(false); setIsAnalysisComplete(false);
setAnalysisError(null); setAnalysisError(null);
try { try {
const data = await marketingAnalysis(businessName, address, category); const data = await marketingAnalysis(businessName, address, category, officialSiteUrl);
if (data.processed_info) { if (data.processed_info) {
data.processed_info.customer_name = data.processed_info.customer_name || businessName; data.processed_info.customer_name = data.processed_info.customer_name || businessName;

View File

@ -291,6 +291,7 @@ const MyContentsPage: React.FC<MyContentsPageProps> = ({ onNavigate }) => {
videoId={video.video_id} videoId={video.video_id}
storeName={video.store_name} storeName={video.store_name}
region={video.region} region={video.region}
title={video.title}
commentCount={video.comment_count ?? 0} commentCount={video.comment_count ?? 0}
initialLikeCount={video.like_count ?? 0} initialLikeCount={video.like_count ?? 0}
initialIsLiked={video.is_liked_by_me} initialIsLiked={video.is_liked_by_me}

View File

@ -5,7 +5,7 @@ import SearchInputForm, { SearchType } from '../../components/SearchInputForm';
interface UrlInputContentProps { interface UrlInputContentProps {
onAnalyze: (value: string, type?: SearchType) => void; onAnalyze: (value: string, type?: SearchType) => void;
onAutocomplete?: (data: AutocompleteRequest) => void; onAutocomplete?: (data: AutocompleteRequest) => void;
onManualInput?: (businessName: string, address: string, category: string) => void; onManualInput?: (businessName: string, address: string, category: string, officialSiteUrl?: string) => void;
error: string | null; error: string | null;
} }

View File

@ -35,7 +35,7 @@ const orbConfigs: OrbConfig[] = [
interface HeroSectionProps { interface HeroSectionProps {
onAnalyze?: (value: string, type?: SearchType) => void; onAnalyze?: (value: string, type?: SearchType) => void;
onAutocomplete?: (data: AutocompleteRequest) => void; onAutocomplete?: (data: AutocompleteRequest) => void;
onManualInput?: (businessName: string, address: string, category: string) => void; onManualInput?: (businessName: string, address: string, category: string, officialSiteUrl?: string) => void;
onNext?: () => void; onNext?: () => void;
error?: string | null; error?: string | null;
scrollProgress?: number; scrollProgress?: number;
@ -184,10 +184,10 @@ const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, on
{isManualModalOpen && ( {isManualModalOpen && (
<BusinessNameInputModal <BusinessNameInputModal
onClose={() => setIsManualModalOpen(false)} onClose={() => setIsManualModalOpen(false)}
onSubmit={(businessName, address, category) => { onSubmit={(businessName, address, category, officialSiteUrl) => {
if (tutorial.isActive) tutorial.nextHint(); if (tutorial.isActive) tutorial.nextHint();
setIsManualModalOpen(false); setIsManualModalOpen(false);
onManualInput?.(businessName, address, category); onManualInput?.(businessName, address, category, officialSiteUrl);
}} }}
/> />
)} )}

View File

@ -720,18 +720,77 @@
flex-direction: column; flex-direction: column;
} }
.video-detail-player-wrap {
position: relative;
width: 100%;
max-width: 360px;
flex-shrink: 0;
}
.video-detail-content.landscape .video-detail-player-wrap {
max-width: 100%;
width: 100%;
}
.video-detail-player { .video-detail-player {
display: block; display: block;
width: 100%; width: 100%;
height: auto; height: auto;
max-width: 360px;
border-radius: 12px; border-radius: 12px;
}
/* 영상 종료 직전 공식 홈페이지 링크 오버레이 (유튜브 엔드스크린 스타일) */
.video-site-overlay {
position: absolute;
left: 12px;
right: 12px;
bottom: 64px; /* 네이티브 컨트롤 바를 가리지 않도록 */
display: flex;
align-items: center;
gap: 10px;
padding: 10px 14px;
background: rgba(0, 0, 0, 0.75);
border: 1px solid rgba(255, 255, 255, 0.25);
border-radius: 10px;
color: #fff;
text-decoration: none;
font-size: 13px;
line-height: 1.35;
backdrop-filter: blur(4px);
animation: video-site-overlay-in 0.3s ease-out;
transition: background 0.2s;
}
.video-site-overlay:hover {
background: rgba(0, 0, 0, 0.9);
}
.video-site-overlay svg {
flex-shrink: 0; flex-shrink: 0;
} }
.video-detail-content.landscape .video-detail-player { .video-site-overlay-text {
max-width: 100%; display: flex;
width: 100%; flex-direction: column;
min-width: 0;
}
.video-site-overlay-text strong {
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@keyframes video-site-overlay-in {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
} }
.video-detail-info { .video-detail-info {
@ -1158,7 +1217,7 @@
.video-detail-content { .video-detail-content {
flex-direction: column; flex-direction: column;
} }
.video-detail-player { .video-detail-player-wrap {
max-width: 100%; max-width: 100%;
width: 100%; width: 100%;
} }

View File

@ -281,6 +281,7 @@ export interface VideoListItem {
title?: string | null; title?: string | null;
description?: string | null; description?: string | null;
hashtags?: string[] | null; hashtags?: string[] | null;
official_site_url?: string | null;
created_at: string; created_at: string;
like_count: number; like_count: number;
comment_count: number; comment_count: number;
@ -294,6 +295,9 @@ export interface VideoDetailItem {
poster_url?: string | null; poster_url?: string | null;
store_name: string; store_name: string;
region: string; region: string;
title?: string | null;
description?: string | null;
official_site_url?: string | null;
created_at: string; created_at: string;
like_count: number; like_count: number;
is_liked_by_me: boolean; is_liked_by_me: boolean;

View File

@ -1093,7 +1093,7 @@ export async function autocomplete(request: AutocompleteRequest): Promise<Crawli
} }
// 업체명·주소 직접 입력으로 마케팅 분석 // 업체명·주소 직접 입력으로 마케팅 분석
export async function marketingAnalysis(storeName: string, address: string, category = ''): Promise<CrawlingResponse> { export async function marketingAnalysis(storeName: string, address: string, category = '', officialSiteUrl?: string): Promise<CrawlingResponse> {
const controller = new AbortController(); const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), CRAWL_TIMEOUT); const timeoutId = setTimeout(() => controller.abort(), CRAWL_TIMEOUT);
@ -1103,7 +1103,12 @@ export async function marketingAnalysis(storeName: string, address: string, cate
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
}, },
body: JSON.stringify({ store_name: storeName, address, category }), body: JSON.stringify({
store_name: storeName,
address,
category,
official_site_url: officialSiteUrl?.trim() || null,
}),
signal: controller.signal, signal: controller.signal,
}); });

View File

@ -1,6 +1,9 @@
/** /**
* 기기의 네이티브 공유 시트를 열고 요청을 처리했는지 반환합니다. * 기기의 네이티브 공유 시트를 열고 요청을 처리했는지 반환합니다.
* *
* 긴 `text`를 넣으면 카카오 등이 URL을 미리보기가 아니라 본문 텍스트로만 보냅니다.
* 제목·설명은 OG 페이지(`og:title`, `og:description`)에 두고, 여기에는 url(과 짧은 title)만 넘깁니다.
*
* 사용자가 공유 시트를 닫은 경우도 정상적으로 처리된 것으로 간주합니다. * 사용자가 공유 시트를 닫은 경우도 정상적으로 처리된 것으로 간주합니다.
*/ */
export async function tryNativeShare(data: ShareData): Promise<boolean> { export async function tryNativeShare(data: ShareData): Promise<boolean> {