Merge branch 'feature/video-official-site-overlay': 영상 종료 전 공식 링크 오버레이
This commit is contained in:
commit
1128712170
@ -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'));
|
||||||
|
|||||||
@ -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')}
|
||||||
|
|||||||
@ -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);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -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);
|
||||||
@ -221,18 +223,46 @@ 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' : ''}`}>
|
||||||
<video
|
<div className="video-detail-player-wrap">
|
||||||
src={video.result_movie_url}
|
<video
|
||||||
controls
|
src={video.result_movie_url}
|
||||||
autoPlay
|
controls
|
||||||
controlsList="nodownload"
|
autoPlay
|
||||||
onContextMenu={(e) => e.preventDefault()}
|
controlsList="nodownload"
|
||||||
className="video-detail-player"
|
onContextMenu={(e) => e.preventDefault()}
|
||||||
onLoadedMetadata={(e) => {
|
className="video-detail-player"
|
||||||
const v = e.currentTarget;
|
onLoadedMetadata={(e) => {
|
||||||
setIsLandscape(v.videoWidth > v.videoHeight);
|
const v = e.currentTarget;
|
||||||
}}
|
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>
|
||||||
|
|||||||
@ -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)",
|
||||||
|
|||||||
@ -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 (트위터)",
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -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%;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
@ -296,6 +297,7 @@ export interface VideoDetailItem {
|
|||||||
region: string;
|
region: string;
|
||||||
title?: string | null;
|
title?: string | null;
|
||||||
description?: 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;
|
||||||
|
|||||||
@ -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,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user