mirror of
https://github.com/ktds-dg0501/kt-event-marketing-fe.git
synced 2025-12-06 11:36:24 +00:00
주요 변경사항: - Step flow 통합: localStorage 기반 eventId 사용 - 자동 이미지 생성: 이미지 없을 시 자동 생성 트리거 - 진행률 바 추가: 0-100% 진행률 표시 - 동적 로딩 메시지: 단계별 메시지 업데이트 - Next.js 15 API routes 수정: params를 Promise로 처리 - 실제 배포 API 연동: Content API 서버 URL 설정 기술 세부사항: - API proxy routes 추가 (CORS 우회) - 2초 폴링 메커니즘 (최대 60초) - 환경변수: NEXT_PUBLIC_CONTENT_API_URL 설정 - CDN URL 디버그 오버레이 제거 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
183 lines
5.8 KiB
HTML
183 lines
5.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ko">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>LocalStorage 테스트</title>
|
|
<style>
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
max-width: 800px;
|
|
margin: 50px auto;
|
|
padding: 20px;
|
|
background: #f5f5f5;
|
|
}
|
|
.container {
|
|
background: white;
|
|
border-radius: 12px;
|
|
padding: 30px;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
}
|
|
h1 {
|
|
color: #333;
|
|
margin-bottom: 20px;
|
|
}
|
|
.form-group {
|
|
margin-bottom: 15px;
|
|
}
|
|
label {
|
|
display: block;
|
|
margin-bottom: 5px;
|
|
color: #666;
|
|
font-weight: 500;
|
|
}
|
|
input, textarea {
|
|
width: 100%;
|
|
padding: 10px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
box-sizing: border-box;
|
|
}
|
|
textarea {
|
|
min-height: 80px;
|
|
resize: vertical;
|
|
}
|
|
button {
|
|
background: linear-gradient(135deg, #C084FC 0%, #F472B6 100%);
|
|
color: white;
|
|
border: none;
|
|
padding: 12px 24px;
|
|
border-radius: 6px;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
margin-right: 10px;
|
|
}
|
|
button:hover {
|
|
opacity: 0.9;
|
|
}
|
|
button.secondary {
|
|
background: #6b7280;
|
|
}
|
|
.success {
|
|
background: #10b981;
|
|
color: white;
|
|
padding: 15px;
|
|
border-radius: 6px;
|
|
margin-top: 20px;
|
|
display: none;
|
|
}
|
|
.current-data {
|
|
background: #f9fafb;
|
|
border: 1px solid #e5e7eb;
|
|
border-radius: 6px;
|
|
padding: 15px;
|
|
margin-top: 20px;
|
|
}
|
|
.current-data pre {
|
|
margin: 10px 0 0 0;
|
|
overflow-x: auto;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>🎨 이벤트 생성 데이터 설정</h1>
|
|
|
|
<div class="form-group">
|
|
<label>이벤트 ID</label>
|
|
<input type="number" id="eventDraftId" value="7777">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>이벤트 제목</label>
|
|
<input type="text" id="eventTitle" value="맥주 파티 이벤트">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>이벤트 설명</label>
|
|
<textarea id="eventDescription">강남에서 열리는 신나는 맥주 파티에 참여하세요!</textarea>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>업종</label>
|
|
<input type="text" id="industry" value="음식점">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>지역</label>
|
|
<input type="text" id="location" value="강남">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>트렌드 (쉼표로 구분)</label>
|
|
<input type="text" id="trends" value="파티,맥주,생맥주">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>경품</label>
|
|
<input type="text" id="prize" value="생맥주 1잔">
|
|
</div>
|
|
|
|
<div style="margin-top: 25px;">
|
|
<button onclick="saveToLocalStorage()">💾 LocalStorage에 저장</button>
|
|
<button class="secondary" onclick="clearLocalStorage()">🗑️ 삭제</button>
|
|
<button class="secondary" onclick="loadCurrentData()">🔄 현재 데이터 보기</button>
|
|
</div>
|
|
|
|
<div id="success" class="success">
|
|
✅ localStorage에 저장되었습니다!<br>
|
|
이제 이벤트 생성 플로우에서 channel → contentPreview로 이동하면<br>
|
|
자동으로 AI 이미지 생성이 시작됩니다.
|
|
</div>
|
|
|
|
<div class="current-data">
|
|
<strong>현재 localStorage 데이터:</strong>
|
|
<pre id="currentData">없음</pre>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function saveToLocalStorage() {
|
|
const eventData = {
|
|
eventDraftId: parseInt(document.getElementById('eventDraftId').value),
|
|
eventTitle: document.getElementById('eventTitle').value,
|
|
eventDescription: document.getElementById('eventDescription').value,
|
|
industry: document.getElementById('industry').value,
|
|
location: document.getElementById('location').value,
|
|
trends: document.getElementById('trends').value.split(',').map(t => t.trim()),
|
|
prize: document.getElementById('prize').value
|
|
};
|
|
|
|
localStorage.setItem('eventCreationData', JSON.stringify(eventData));
|
|
|
|
document.getElementById('success').style.display = 'block';
|
|
setTimeout(() => {
|
|
document.getElementById('success').style.display = 'none';
|
|
}, 5000);
|
|
|
|
loadCurrentData();
|
|
}
|
|
|
|
function clearLocalStorage() {
|
|
localStorage.removeItem('eventCreationData');
|
|
document.getElementById('currentData').textContent = '없음';
|
|
alert('localStorage가 삭제되었습니다.');
|
|
}
|
|
|
|
function loadCurrentData() {
|
|
const data = localStorage.getItem('eventCreationData');
|
|
if (data) {
|
|
document.getElementById('currentData').textContent = JSON.stringify(JSON.parse(data), null, 2);
|
|
} else {
|
|
document.getElementById('currentData').textContent = '없음';
|
|
}
|
|
}
|
|
|
|
// 페이지 로드 시 현재 데이터 표시
|
|
window.onload = loadCurrentData;
|
|
</script>
|
|
</body>
|
|
</html>
|