mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2025-12-06 11:26:26 +00:00
edit prototype
This commit is contained in:
parent
d4728c0078
commit
debf4be7c6
@ -1,17 +1,26 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta name="description" content="KT AI 기반 소상공인 이벤트 자동 생성 서비스 - AI트렌드분석결과">
|
<meta
|
||||||
|
name="description"
|
||||||
|
content="KT AI 기반 소상공인 이벤트 자동 생성 서비스 - AI트렌드분석결과"
|
||||||
|
/>
|
||||||
<title>AI 트렌드 분석 - KT 이벤트 마케팅</title>
|
<title>AI 트렌드 분석 - KT 이벤트 마케팅</title>
|
||||||
|
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
<link rel="stylesheet" href="css/common.css">
|
<link rel="stylesheet" href="css/common.css" />
|
||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
<link
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css">
|
rel="stylesheet"
|
||||||
|
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css"
|
||||||
|
/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Skip Link -->
|
<!-- Skip Link -->
|
||||||
@ -21,71 +30,181 @@
|
|||||||
<div class="app-wrapper">
|
<div class="app-wrapper">
|
||||||
<!-- Top App Bar -->
|
<!-- Top App Bar -->
|
||||||
<header class="app-bar">
|
<header class="app-bar">
|
||||||
<button class="app-bar__back" aria-label="뒤로가기" onclick="window.history.back()">
|
<button
|
||||||
|
class="app-bar__back"
|
||||||
|
aria-label="뒤로가기"
|
||||||
|
onclick="window.history.back()"
|
||||||
|
>
|
||||||
<span class="material-icons">arrow_back</span>
|
<span class="material-icons">arrow_back</span>
|
||||||
</button>
|
</button>
|
||||||
<h1 class="app-bar__title">AI 트렌드 분석</h1>
|
<h1 class="app-bar__title">AI 트렌드 분석</h1>
|
||||||
<button class="app-bar__action" aria-label="홈으로" onclick="window.location.href='21.5-홈.html'">
|
<button
|
||||||
|
class="app-bar__action"
|
||||||
|
aria-label="홈으로"
|
||||||
|
onclick="window.location.href='21.5-홈.html'"
|
||||||
|
>
|
||||||
<span class="material-icons">close</span>
|
<span class="material-icons">close</span>
|
||||||
</button>
|
</button>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<!-- Main Content -->
|
<!-- Main Content -->
|
||||||
<main id="main-content" class="app-content">
|
<main id="main-content" class="app-content">
|
||||||
<div class="container" style="max-width: 500px; margin: 0 auto; padding-top: 24px;">
|
<div
|
||||||
|
class="container"
|
||||||
|
style="max-width: 500px; margin: 0 auto; padding-top: 24px"
|
||||||
|
>
|
||||||
<!-- Progress Section -->
|
<!-- Progress Section -->
|
||||||
<div style="margin-bottom: 32px;">
|
<div style="margin-bottom: 32px">
|
||||||
<div class="body-m" style="margin-bottom: 8px; font-weight: 600;">단계 2/6: 트렌드 분석</div>
|
<div class="body-m" style="margin-bottom: 8px; font-weight: 600">
|
||||||
<div style="display: flex; gap: 4px;">
|
단계 2/6: 트렌드 분석
|
||||||
<div style="flex: 1; height: 4px; background: var(--color-primary-main); border-radius: 2px;"></div>
|
</div>
|
||||||
<div style="flex: 1; height: 4px; background: var(--color-primary-main); border-radius: 2px;"></div>
|
<div style="display: flex; gap: 4px">
|
||||||
<div style="flex: 1; height: 4px; background: var(--color-gray-200); border-radius: 2px;"></div>
|
<div
|
||||||
<div style="flex: 1; height: 4px; background: var(--color-gray-200); border-radius: 2px;"></div>
|
style="
|
||||||
<div style="flex: 1; height: 4px; background: var(--color-gray-200); border-radius: 2px;"></div>
|
flex: 1;
|
||||||
<div style="flex: 1; height: 4px; background: var(--color-gray-200); border-radius: 2px;"></div>
|
height: 4px;
|
||||||
|
background: var(--color-primary-main);
|
||||||
|
border-radius: 2px;
|
||||||
|
"
|
||||||
|
></div>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
flex: 1;
|
||||||
|
height: 4px;
|
||||||
|
background: var(--color-primary-main);
|
||||||
|
border-radius: 2px;
|
||||||
|
"
|
||||||
|
></div>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
flex: 1;
|
||||||
|
height: 4px;
|
||||||
|
background: var(--color-gray-200);
|
||||||
|
border-radius: 2px;
|
||||||
|
"
|
||||||
|
></div>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
flex: 1;
|
||||||
|
height: 4px;
|
||||||
|
background: var(--color-gray-200);
|
||||||
|
border-radius: 2px;
|
||||||
|
"
|
||||||
|
></div>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
flex: 1;
|
||||||
|
height: 4px;
|
||||||
|
background: var(--color-gray-200);
|
||||||
|
border-radius: 2px;
|
||||||
|
"
|
||||||
|
></div>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
flex: 1;
|
||||||
|
height: 4px;
|
||||||
|
background: var(--color-gray-200);
|
||||||
|
border-radius: 2px;
|
||||||
|
"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- AI Analysis Loading -->
|
<!-- AI Analysis Loading -->
|
||||||
<div id="loadingSection" style="text-align: center; padding: 40px 0;">
|
<div id="loadingSection" style="text-align: center; padding: 40px 0">
|
||||||
<div class="spinner" style="margin: 0 auto 24px;"></div>
|
<div class="spinner" style="margin: 0 auto 24px"></div>
|
||||||
<h2 class="h3" style="margin-bottom: 8px;">🤖 AI가 분석중입니다...</h2>
|
<h2 class="h3" style="margin-bottom: 8px">
|
||||||
<p class="body-m text-muted">업종, 지역, 시즌을 고려한 트렌드를 분석하고 있습니다</p>
|
🤖 AI가 분석중입니다...
|
||||||
<div id="progressBar" style="width: 100%; height: 8px; background: var(--color-gray-200); border-radius: 4px; margin: 24px 0; overflow: hidden;">
|
</h2>
|
||||||
<div id="progressFill" style="height: 100%; background: var(--color-primary-main); width: 0%; transition: width 0.3s ease;"></div>
|
<p class="body-m text-muted">
|
||||||
|
업종, 지역, 시즌을 고려한 트렌드를 분석하고 있습니다
|
||||||
|
</p>
|
||||||
|
<div
|
||||||
|
id="progressBar"
|
||||||
|
style="
|
||||||
|
width: 100%;
|
||||||
|
height: 8px;
|
||||||
|
background: var(--color-gray-200);
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: 24px 0;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
id="progressFill"
|
||||||
|
style="
|
||||||
|
height: 100%;
|
||||||
|
background: var(--color-primary-main);
|
||||||
|
width: 0%;
|
||||||
|
transition: width 0.3s ease;
|
||||||
|
"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
<div class="body-s text-muted" id="progressText">
|
||||||
|
분석 시작 중...
|
||||||
</div>
|
</div>
|
||||||
<div class="body-s text-muted" id="progressText">분석 시작 중...</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Analysis Results (Hidden initially) -->
|
<!-- Analysis Results (Hidden initially) -->
|
||||||
<div id="resultsSection" style="display: none; opacity: 0; transition: opacity 0.5s ease;">
|
<div
|
||||||
|
id="resultsSection"
|
||||||
|
style="display: none; opacity: 0; transition: opacity 0.5s ease"
|
||||||
|
>
|
||||||
<!-- Store Info -->
|
<!-- Store Info -->
|
||||||
<div style="margin-bottom: 32px;">
|
<div style="margin-bottom: 32px">
|
||||||
<h2 class="h3" style="margin-bottom: 16px; display: flex; align-items: center; gap: 8px;">
|
<h2
|
||||||
|
class="h3"
|
||||||
|
style="
|
||||||
|
margin-bottom: 16px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
"
|
||||||
|
>
|
||||||
<span>📊</span>
|
<span>📊</span>
|
||||||
<span>분석 결과</span>
|
<span>분석 결과</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div class="card" style="padding: 16px;">
|
<div class="card" style="padding: 16px">
|
||||||
<div style="display: grid; grid-template-columns: auto 1fr; gap: 12px 16px;">
|
<div
|
||||||
|
style="
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto 1fr;
|
||||||
|
gap: 12px 16px;
|
||||||
|
"
|
||||||
|
>
|
||||||
<div class="body-m text-muted">매장</div>
|
<div class="body-m text-muted">매장</div>
|
||||||
<div class="body-m" style="font-weight: 600;" id="storeName">-</div>
|
<div class="body-m" style="font-weight: 600" id="storeName">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="body-m text-muted">업종</div>
|
<div class="body-m text-muted">업종</div>
|
||||||
<div class="body-m" style="font-weight: 600;" id="businessType">-</div>
|
<div
|
||||||
|
class="body-m"
|
||||||
|
style="font-weight: 600"
|
||||||
|
id="businessType"
|
||||||
|
>
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="body-m text-muted">지역</div>
|
<div class="body-m text-muted">지역</div>
|
||||||
<div class="body-m" style="font-weight: 600;" id="location">-</div>
|
<div class="body-m" style="font-weight: 600" id="location">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="body-m text-muted">시즌</div>
|
<div class="body-m text-muted">시즌</div>
|
||||||
<div class="body-m" style="font-weight: 600;" id="season">-</div>
|
<div class="body-m" style="font-weight: 600" id="season">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Trends -->
|
<!-- Trends -->
|
||||||
<div style="margin-bottom: 32px;">
|
<div style="margin-bottom: 32px">
|
||||||
<h3 class="body-l" style="font-weight: 700; margin-bottom: 16px;">주요 트렌드</h3>
|
<h3 class="body-l" style="font-weight: 700; margin-bottom: 16px">
|
||||||
|
주요 트렌드
|
||||||
|
</h3>
|
||||||
|
|
||||||
<div id="trendsList">
|
<div id="trendsList">
|
||||||
<!-- Trends will be dynamically added here -->
|
<!-- Trends will be dynamically added here -->
|
||||||
@ -93,12 +212,29 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Success Rate -->
|
<!-- Success Rate -->
|
||||||
<div style="margin-bottom: 32px;">
|
<div style="margin-bottom: 32px">
|
||||||
<div class="card" style="padding: 20px; text-align: center; background: linear-gradient(135deg, var(--color-secondary-light) 0%, var(--color-white) 100%);">
|
<div
|
||||||
<div class="h2" style="color: var(--color-secondary-main); margin-bottom: 8px;" id="successRate">
|
class="card"
|
||||||
|
style="
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
var(--color-secondary-light) 0%,
|
||||||
|
var(--color-white) 100%
|
||||||
|
);
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="h2"
|
||||||
|
style="color: var(--color-secondary-main); margin-bottom: 8px"
|
||||||
|
id="successRate"
|
||||||
|
>
|
||||||
78% 🎯
|
78% 🎯
|
||||||
</div>
|
</div>
|
||||||
<div class="body-m text-muted">예상 성공률 (동일 업종 평균 대비)</div>
|
<div class="body-m text-muted">
|
||||||
|
예상 성공률 (동일 업종 평균 대비)
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -106,10 +242,14 @@
|
|||||||
<button
|
<button
|
||||||
id="retryBtn"
|
id="retryBtn"
|
||||||
class="btn btn-secondary btn-md btn-block"
|
class="btn btn-secondary btn-md btn-block"
|
||||||
style="display: none; margin-bottom: 16px;"
|
style="display: none; margin-bottom: 16px"
|
||||||
onclick="retryAnalysis()"
|
onclick="retryAnalysis()"
|
||||||
>
|
>
|
||||||
<span class="material-icons" style="font-size: 20px; margin-right: 8px;">refresh</span>
|
<span
|
||||||
|
class="material-icons"
|
||||||
|
style="font-size: 20px; margin-right: 8px"
|
||||||
|
>refresh</span
|
||||||
|
>
|
||||||
다시 분석하기
|
다시 분석하기
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@ -117,7 +257,7 @@
|
|||||||
<button
|
<button
|
||||||
id="nextBtn"
|
id="nextBtn"
|
||||||
class="btn btn-primary btn-lg btn-block"
|
class="btn btn-primary btn-lg btn-block"
|
||||||
style="margin-bottom: 32px;"
|
style="margin-bottom: 32px"
|
||||||
>
|
>
|
||||||
다음 (경품추천)
|
다음 (경품추천)
|
||||||
</button>
|
</button>
|
||||||
@ -130,14 +270,14 @@
|
|||||||
<script src="js/common.js"></script>
|
<script src="js/common.js"></script>
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
"use strict";
|
||||||
|
|
||||||
const loadingSection = document.getElementById('loadingSection');
|
const loadingSection = document.getElementById("loadingSection");
|
||||||
const resultsSection = document.getElementById('resultsSection');
|
const resultsSection = document.getElementById("resultsSection");
|
||||||
const progressFill = document.getElementById('progressFill');
|
const progressFill = document.getElementById("progressFill");
|
||||||
const progressText = document.getElementById('progressText');
|
const progressText = document.getElementById("progressText");
|
||||||
const nextBtn = document.getElementById('nextBtn');
|
const nextBtn = document.getElementById("nextBtn");
|
||||||
const retryBtn = document.getElementById('retryBtn');
|
const retryBtn = document.getElementById("retryBtn");
|
||||||
|
|
||||||
// 상태 로드
|
// 상태 로드
|
||||||
window.AppState.load();
|
window.AppState.load();
|
||||||
@ -146,9 +286,9 @@
|
|||||||
|
|
||||||
// 매장 정보가 없으면 이전 화면으로
|
// 매장 정보가 없으면 이전 화면으로
|
||||||
if (!store) {
|
if (!store) {
|
||||||
Toast.error('매장 정보를 먼저 등록해주세요.');
|
Toast.error("매장 정보를 먼저 등록해주세요.");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = '02-매장정보등록.html';
|
window.location.href = "02-매장정보등록.html";
|
||||||
}, 1000);
|
}, 1000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -156,11 +296,11 @@
|
|||||||
// AI 분석 시뮬레이션
|
// AI 분석 시뮬레이션
|
||||||
let progress = 0;
|
let progress = 0;
|
||||||
const analysisSteps = [
|
const analysisSteps = [
|
||||||
{ progress: 20, text: '업종 데이터 수집 중...' },
|
{ progress: 20, text: "업종 데이터 수집 중..." },
|
||||||
{ progress: 40, text: '지역 트렌드 분석 중...' },
|
{ progress: 40, text: "지역 트렌드 분석 중..." },
|
||||||
{ progress: 60, text: '시즌 패턴 학습 중...' },
|
{ progress: 60, text: "시즌 패턴 학습 중..." },
|
||||||
{ progress: 80, text: '최적 전략 계산 중...' },
|
{ progress: 80, text: "최적 전략 계산 중..." },
|
||||||
{ progress: 100, text: '분석 완료!' }
|
{ progress: 100, text: "분석 완료!" },
|
||||||
];
|
];
|
||||||
|
|
||||||
let currentStep = 0;
|
let currentStep = 0;
|
||||||
@ -168,7 +308,7 @@
|
|||||||
function updateProgress() {
|
function updateProgress() {
|
||||||
if (currentStep < analysisSteps.length) {
|
if (currentStep < analysisSteps.length) {
|
||||||
const step = analysisSteps[currentStep];
|
const step = analysisSteps[currentStep];
|
||||||
progressFill.style.width = step.progress + '%';
|
progressFill.style.width = step.progress + "%";
|
||||||
progressText.textContent = step.text;
|
progressText.textContent = step.text;
|
||||||
currentStep++;
|
currentStep++;
|
||||||
|
|
||||||
@ -184,31 +324,40 @@
|
|||||||
// 분석 결과 표시
|
// 분석 결과 표시
|
||||||
function showResults() {
|
function showResults() {
|
||||||
// 로딩 숨기기
|
// 로딩 숨기기
|
||||||
loadingSection.style.display = 'none';
|
loadingSection.style.display = "none";
|
||||||
|
|
||||||
// 매장 정보 표시
|
// 매장 정보 표시
|
||||||
document.getElementById('storeName').textContent = store.name || '-';
|
document.getElementById("storeName").textContent = store.name || "-";
|
||||||
document.getElementById('businessType').textContent = store.businessTypeName || '-';
|
document.getElementById("businessType").textContent =
|
||||||
|
store.businessTypeName || "-";
|
||||||
|
|
||||||
const addressParts = store.address ? store.address.split(' ') : [];
|
const addressParts = store.address ? store.address.split(" ") : [];
|
||||||
const locationText = addressParts.slice(0, 3).join(' ') || '-';
|
const locationText = addressParts.slice(0, 3).join(" ") || "-";
|
||||||
document.getElementById('location').textContent = locationText;
|
document.getElementById("location").textContent = locationText;
|
||||||
|
|
||||||
// 현재 시즌 계산
|
// 현재 시즌 계산
|
||||||
const currentMonth = new Date().getMonth() + 1;
|
const currentMonth = new Date().getMonth() + 1;
|
||||||
let season = '';
|
let season = "";
|
||||||
if (currentMonth >= 3 && currentMonth <= 5) season = '봄';
|
if (currentMonth >= 3 && currentMonth <= 5) season = "봄";
|
||||||
else if (currentMonth >= 6 && currentMonth <= 8) season = '여름';
|
else if (currentMonth >= 6 && currentMonth <= 8) season = "여름";
|
||||||
else if (currentMonth >= 9 && currentMonth <= 11) season = '가을';
|
else if (currentMonth >= 9 && currentMonth <= 11) season = "가을";
|
||||||
else season = '겨울';
|
else season = "겨울";
|
||||||
document.getElementById('season').textContent = `${season} (${currentMonth}월)`;
|
document.getElementById(
|
||||||
|
"season"
|
||||||
|
).textContent = `${season} (${currentMonth}월)`;
|
||||||
|
|
||||||
// 트렌드 데이터 생성 (업종별 트렌드 시뮬레이션)
|
// 트렌드 데이터 생성 (업종별 트렌드 시뮬레이션)
|
||||||
const trends = generateTrends(store.businessType, season, event.purpose);
|
const trends = generateTrends(
|
||||||
|
store.businessType,
|
||||||
|
season,
|
||||||
|
event.purpose
|
||||||
|
);
|
||||||
|
|
||||||
// 트렌드 렌더링
|
// 트렌드 렌더링
|
||||||
const trendsList = document.getElementById('trendsList');
|
const trendsList = document.getElementById("trendsList");
|
||||||
trendsList.innerHTML = trends.map((trend, index) => `
|
trendsList.innerHTML = trends
|
||||||
|
.map(
|
||||||
|
(trend, index) => `
|
||||||
<div class="trend-card" onclick="showTrendDetail(${index})" style="margin-bottom: 12px; cursor: pointer;">
|
<div class="trend-card" onclick="showTrendDetail(${index})" style="margin-bottom: 12px; cursor: pointer;">
|
||||||
<div class="card" style="padding: 16px; transition: all 0.3s ease;">
|
<div class="card" style="padding: 16px; transition: all 0.3s ease;">
|
||||||
<div style="display: flex; gap: 12px;">
|
<div style="display: flex; gap: 12px;">
|
||||||
@ -225,27 +374,35 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`).join('');
|
`
|
||||||
|
)
|
||||||
|
.join("");
|
||||||
|
|
||||||
// 성공률 계산
|
// 성공률 계산
|
||||||
const successRate = calculateSuccessRate(store.businessType, event.purpose, trends);
|
const successRate = calculateSuccessRate(
|
||||||
document.getElementById('successRate').textContent = `${successRate}% 🎯`;
|
store.businessType,
|
||||||
|
event.purpose,
|
||||||
|
trends
|
||||||
|
);
|
||||||
|
document.getElementById(
|
||||||
|
"successRate"
|
||||||
|
).textContent = `${successRate}% 🎯`;
|
||||||
|
|
||||||
// 분석 결과 저장
|
// 분석 결과 저장
|
||||||
event.trendAnalysis = {
|
event.trendAnalysis = {
|
||||||
trends: trends,
|
trends: trends,
|
||||||
successRate: successRate,
|
successRate: successRate,
|
||||||
analyzedAt: new Date().toISOString()
|
analyzedAt: new Date().toISOString(),
|
||||||
};
|
};
|
||||||
window.AppState.save();
|
window.AppState.save();
|
||||||
|
|
||||||
// 결과 섹션 표시 (페이드인)
|
// 결과 섹션 표시 (페이드인)
|
||||||
resultsSection.style.display = 'block';
|
resultsSection.style.display = "block";
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
resultsSection.style.opacity = '1';
|
resultsSection.style.opacity = "1";
|
||||||
}, 50);
|
}, 50);
|
||||||
|
|
||||||
Toast.success('AI 트렌드 분석이 완료되었습니다!');
|
Toast.success("AI 트렌드 분석이 완료되었습니다!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 업종/시즌/목적별 트렌드 생성
|
// 업종/시즌/목적별 트렌드 생성
|
||||||
@ -253,34 +410,104 @@
|
|||||||
const trendData = {
|
const trendData = {
|
||||||
restaurant: {
|
restaurant: {
|
||||||
winter: [
|
winter: [
|
||||||
{ emoji: '1️⃣', title: '연말 모임 증가', recommendation: '단체 할인 이벤트 효과적', description: '회식, 송년회 수요 급증으로 단체 예약 고객 공략 필요' },
|
{
|
||||||
{ emoji: '2️⃣', title: '배달 주문 급증', recommendation: '배달 경품 추천', description: '추운 날씨로 배달 주문 40% 증가, 배달 전용 혜택 제공' },
|
emoji: "1️⃣",
|
||||||
{ emoji: '3️⃣', title: 'SNS 공유 활발', recommendation: '바이럴 참여방법 권장', description: '연말 분위기로 SNS 공유율 높음, 해시태그 이벤트 효과적' }
|
title: "연말 모임 증가",
|
||||||
|
recommendation: "단체 할인 이벤트 효과적",
|
||||||
|
description:
|
||||||
|
"회식, 송년회 수요 급증으로 단체 예약 고객 공략 필요",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
emoji: "2️⃣",
|
||||||
|
title: "배달 주문 급증",
|
||||||
|
recommendation: "배달 경품 추천",
|
||||||
|
description:
|
||||||
|
"추운 날씨로 배달 주문 40% 증가, 배달 전용 혜택 제공",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
emoji: "3️⃣",
|
||||||
|
title: "SNS 공유 활발",
|
||||||
|
recommendation: "바이럴 참여방법 권장",
|
||||||
|
description:
|
||||||
|
"연말 분위기로 SNS 공유율 높음, 해시태그 이벤트 효과적",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
spring: [
|
spring: [
|
||||||
{ emoji: '1️⃣', title: '야외 활동 증가', recommendation: '테이크아웃 이벤트', description: '봄 나들이 시즌, 테이크아웃 주문 35% 증가' },
|
{
|
||||||
{ emoji: '2️⃣', title: '가족 단위 방문', recommendation: '패밀리 세트 경품', description: '주말 가족 방문객 증가, 어린이 메뉴 할인 효과적' },
|
emoji: "1️⃣",
|
||||||
{ emoji: '3️⃣', title: '건강식 선호', recommendation: '건강 메뉴 홍보', description: '봄철 건강관리 트렌드, 저칼로리 메뉴 각광' }
|
title: "야외 활동 증가",
|
||||||
]
|
recommendation: "테이크아웃 이벤트",
|
||||||
|
description: "봄 나들이 시즌, 테이크아웃 주문 35% 증가",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
emoji: "2️⃣",
|
||||||
|
title: "가족 단위 방문",
|
||||||
|
recommendation: "패밀리 세트 경품",
|
||||||
|
description: "주말 가족 방문객 증가, 어린이 메뉴 할인 효과적",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
emoji: "3️⃣",
|
||||||
|
title: "건강식 선호",
|
||||||
|
recommendation: "건강 메뉴 홍보",
|
||||||
|
description: "봄철 건강관리 트렌드, 저칼로리 메뉴 각광",
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
cafe: {
|
cafe: {
|
||||||
winter: [
|
winter: [
|
||||||
{ emoji: '1️⃣', title: '따뜻한 음료 선호', recommendation: '핫 음료 할인 이벤트', description: '겨울철 따뜻한 음료 판매량 60% 증가' },
|
{
|
||||||
{ emoji: '2️⃣', title: '실내 체류 시간 증가', recommendation: '재방문 쿠폰 제공', description: '추운 날씨로 카페 체류시간 2배 증가' },
|
emoji: "1️⃣",
|
||||||
{ emoji: '3️⃣', title: '디저트 수요 증가', recommendation: '음료+디저트 세트', description: '연말 분위기로 디저트 주문 45% 상승' }
|
title: "따뜻한 음료 선호",
|
||||||
]
|
recommendation: "핫 음료 할인 이벤트",
|
||||||
}
|
description: "겨울철 따뜻한 음료 판매량 60% 증가",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
emoji: "2️⃣",
|
||||||
|
title: "실내 체류 시간 증가",
|
||||||
|
recommendation: "재방문 쿠폰 제공",
|
||||||
|
description: "추운 날씨로 카페 체류시간 2배 증가",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
emoji: "3️⃣",
|
||||||
|
title: "디저트 수요 증가",
|
||||||
|
recommendation: "음료+디저트 세트",
|
||||||
|
description: "연말 분위기로 디저트 주문 45% 상승",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// 기본 트렌드 (업종/시즌이 매칭되지 않을 경우)
|
// 기본 트렌드 (업종/시즌이 매칭되지 않을 경우)
|
||||||
const defaultTrends = [
|
const defaultTrends = [
|
||||||
{ emoji: '1️⃣', title: '할인 이벤트 선호', recommendation: '가격 할인 경품 추천', description: '소비자 가격 민감도 증가, 할인 이벤트 참여율 높음' },
|
{
|
||||||
{ emoji: '2️⃣', title: '모바일 접근성 중요', recommendation: 'QR코드 참여방식', description: '모바일 결제 증가, 간편한 참여 방법 선호' },
|
emoji: "1️⃣",
|
||||||
{ emoji: '3️⃣', title: '후기 공유 활발', recommendation: '리뷰 이벤트 연계', description: 'SNS 리뷰 작성 유도로 바이럴 효과 기대' }
|
title: "할인 이벤트 선호",
|
||||||
|
recommendation: "가격 할인 경품 추천",
|
||||||
|
description: "소비자 가격 민감도 증가, 할인 이벤트 참여율 높음",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
emoji: "2️⃣",
|
||||||
|
title: "모바일 접근성 중요",
|
||||||
|
recommendation: "QR코드 참여방식",
|
||||||
|
description: "모바일 결제 증가, 간편한 참여 방법 선호",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
emoji: "3️⃣",
|
||||||
|
title: "후기 공유 활발",
|
||||||
|
recommendation: "리뷰 이벤트 연계",
|
||||||
|
description: "SNS 리뷰 작성 유도로 바이럴 효과 기대",
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
// 업종과 시즌에 맞는 트렌드 반환
|
// 업종과 시즌에 맞는 트렌드 반환
|
||||||
const seasonKey = season === '봄' ? 'spring' : season === '여름' ? 'summer' : season === '가을' ? 'fall' : 'winter';
|
const seasonKey =
|
||||||
|
season === "봄"
|
||||||
|
? "spring"
|
||||||
|
: season === "여름"
|
||||||
|
? "summer"
|
||||||
|
: season === "가을"
|
||||||
|
? "fall"
|
||||||
|
: "winter";
|
||||||
|
|
||||||
if (trendData[businessType] && trendData[businessType][seasonKey]) {
|
if (trendData[businessType] && trendData[businessType][seasonKey]) {
|
||||||
return trendData[businessType][seasonKey];
|
return trendData[businessType][seasonKey];
|
||||||
@ -302,7 +529,7 @@
|
|||||||
cafe: 78,
|
cafe: 78,
|
||||||
retail: 72,
|
retail: 72,
|
||||||
beauty: 80,
|
beauty: 80,
|
||||||
service: 70
|
service: 70,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (businessRates[businessType]) {
|
if (businessRates[businessType]) {
|
||||||
@ -314,7 +541,7 @@
|
|||||||
new_customer: 3,
|
new_customer: 3,
|
||||||
repeat_visit: 5,
|
repeat_visit: 5,
|
||||||
sales_increase: 0,
|
sales_increase: 0,
|
||||||
brand_awareness: -2
|
brand_awareness: -2,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (purposeBonus[purpose] !== undefined) {
|
if (purposeBonus[purpose] !== undefined) {
|
||||||
@ -357,33 +584,33 @@
|
|||||||
// 재시도
|
// 재시도
|
||||||
window.retryAnalysis = function () {
|
window.retryAnalysis = function () {
|
||||||
// 결과 숨기기
|
// 결과 숨기기
|
||||||
resultsSection.style.display = 'none';
|
resultsSection.style.display = "none";
|
||||||
resultsSection.style.opacity = '0';
|
resultsSection.style.opacity = "0";
|
||||||
retryBtn.style.display = 'none';
|
retryBtn.style.display = "none";
|
||||||
|
|
||||||
// 로딩 다시 표시
|
// 로딩 다시 표시
|
||||||
loadingSection.style.display = 'block';
|
loadingSection.style.display = "block";
|
||||||
currentStep = 0;
|
currentStep = 0;
|
||||||
progress = 0;
|
progress = 0;
|
||||||
progressFill.style.width = '0%';
|
progressFill.style.width = "0%";
|
||||||
progressText.textContent = '분석 시작 중...';
|
progressText.textContent = "분석 시작 중...";
|
||||||
|
|
||||||
// 분석 재시작
|
// 분석 재시작
|
||||||
setTimeout(updateProgress, 500);
|
setTimeout(updateProgress, 500);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 다음 버튼
|
// 다음 버튼
|
||||||
nextBtn.addEventListener('click', function() {
|
nextBtn.addEventListener("click", function () {
|
||||||
Loading.show('경품 추천 준비 중...');
|
Loading.show("경품 추천 준비 중...");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = '05-AI경품추천.html';
|
window.location.href = "05-AI경품추천.html";
|
||||||
}, 800);
|
}, 800);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 페이지 로드 시 분석 시작
|
// 페이지 로드 시 분석 시작
|
||||||
setTimeout(updateProgress, 1000);
|
setTimeout(updateProgress, 1000);
|
||||||
|
|
||||||
console.log('AI트렌드분석결과 페이지 로드 완료');
|
console.log("AI트렌드분석결과 페이지 로드 완료");
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -400,7 +627,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keyframes pulse {
|
@keyframes pulse {
|
||||||
0%, 100% {
|
0%,
|
||||||
|
100% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
50% {
|
50% {
|
||||||
|
|||||||
@ -1,12 +1,18 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>SNS 이미지 생성 - KT AI 이벤트 마케팅</title>
|
<title>SNS 이미지 생성 - KT AI 이벤트 마케팅</title>
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css" />
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
<link
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css">
|
rel="stylesheet"
|
||||||
|
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css"
|
||||||
|
/>
|
||||||
<style>
|
<style>
|
||||||
.image-preview {
|
.image-preview {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -65,8 +71,12 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
0% { transform: rotate(0deg); }
|
0% {
|
||||||
100% { transform: rotate(360deg); }
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
@ -75,16 +85,23 @@
|
|||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div id="header"></div>
|
<div id="header"></div>
|
||||||
|
|
||||||
<div class="container" style="max-width: 800px;">
|
<div class="container" style="max-width: 800px">
|
||||||
<!-- Loading State -->
|
<!-- Loading State -->
|
||||||
<div id="loadingState" class="text-center mt-2xl mb-2xl">
|
<div id="loadingState" class="text-center mt-2xl mb-2xl">
|
||||||
<span class="material-icons" style="font-size: 64px; color: var(--color-ai-blue); animation: spin 2s linear infinite;">psychology</span>
|
<span
|
||||||
|
class="material-icons"
|
||||||
|
style="
|
||||||
|
font-size: 64px;
|
||||||
|
color: var(--color-ai-blue);
|
||||||
|
animation: spin 2s linear infinite;
|
||||||
|
"
|
||||||
|
>psychology</span
|
||||||
|
>
|
||||||
<h3 class="text-headline mt-md mb-sm">AI 이미지 생성 중</h3>
|
<h3 class="text-headline mt-md mb-sm">AI 이미지 생성 중</h3>
|
||||||
<p class="text-body text-secondary mb-lg">
|
<p class="text-body text-secondary mb-lg">
|
||||||
딥러닝 모델이 이벤트에 어울리는<br>
|
딥러닝 모델이 이벤트에 어울리는<br />
|
||||||
이미지를 생성하고 있어요...
|
이미지를 생성하고 있어요...
|
||||||
</p>
|
</p>
|
||||||
<div class="spinner mx-auto"></div>
|
|
||||||
<p class="text-caption text-tertiary mt-md">예상 시간: 5초</p>
|
<p class="text-caption text-tertiary mt-md">예상 시간: 5초</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -96,17 +113,32 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="image-preview mb-md">
|
<div class="image-preview mb-md">
|
||||||
<div class="image-preview-placeholder">
|
<div class="image-preview-placeholder">
|
||||||
<span class="material-icons" style="font-size: 48px;">celebration</span>
|
<span class="material-icons" style="font-size: 48px"
|
||||||
<p class="text-body-small mt-sm" id="style1Title">SNS 팔로우 이벤트</p>
|
>celebration</span
|
||||||
<p class="text-caption text-secondary" id="style1Prize">커피 쿠폰</p>
|
>
|
||||||
|
<p class="text-body-small mt-sm" id="style1Title">
|
||||||
|
SNS 팔로우 이벤트
|
||||||
|
</p>
|
||||||
|
<p class="text-caption text-secondary" id="style1Prize">
|
||||||
|
커피 쿠폰
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input type="radio" name="imageStyle" id="style1" value="simple" class="form-check-input">
|
<input
|
||||||
|
type="radio"
|
||||||
|
name="imageStyle"
|
||||||
|
id="style1"
|
||||||
|
value="simple"
|
||||||
|
class="form-check-input"
|
||||||
|
/>
|
||||||
<label for="style1" class="form-check-label">선택</label>
|
<label for="style1" class="form-check-label">선택</label>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-text btn-small preview-btn" data-style="simple">
|
<button
|
||||||
|
class="btn btn-text btn-small preview-btn"
|
||||||
|
data-style="simple"
|
||||||
|
>
|
||||||
<span class="material-icons">zoom_in</span>
|
<span class="material-icons">zoom_in</span>
|
||||||
크게보기
|
크게보기
|
||||||
</button>
|
</button>
|
||||||
@ -118,19 +150,39 @@
|
|||||||
<section class="mb-lg">
|
<section class="mb-lg">
|
||||||
<h3 class="text-headline mb-md">스타일 2: 화려</h3>
|
<h3 class="text-headline mb-md">스타일 2: 화려</h3>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="image-preview mb-md" style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);">
|
<div
|
||||||
<div class="image-preview-placeholder" style="color: white;">
|
class="image-preview mb-md"
|
||||||
<span class="material-icons" style="font-size: 48px;">auto_awesome</span>
|
style="
|
||||||
<p class="text-body-small mt-sm" id="style2Title">SNS 팔로우 이벤트</p>
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
<p class="text-caption" style="opacity: 0.9;" id="style2Prize">커피 쿠폰</p>
|
"
|
||||||
|
>
|
||||||
|
<div class="image-preview-placeholder" style="color: white">
|
||||||
|
<span class="material-icons" style="font-size: 48px"
|
||||||
|
>auto_awesome</span
|
||||||
|
>
|
||||||
|
<p class="text-body-small mt-sm" id="style2Title">
|
||||||
|
SNS 팔로우 이벤트
|
||||||
|
</p>
|
||||||
|
<p class="text-caption" style="opacity: 0.9" id="style2Prize">
|
||||||
|
커피 쿠폰
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input type="radio" name="imageStyle" id="style2" value="fancy" class="form-check-input">
|
<input
|
||||||
|
type="radio"
|
||||||
|
name="imageStyle"
|
||||||
|
id="style2"
|
||||||
|
value="fancy"
|
||||||
|
class="form-check-input"
|
||||||
|
/>
|
||||||
<label for="style2" class="form-check-label">선택</label>
|
<label for="style2" class="form-check-label">선택</label>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-text btn-small preview-btn" data-style="fancy">
|
<button
|
||||||
|
class="btn btn-text btn-small preview-btn"
|
||||||
|
data-style="fancy"
|
||||||
|
>
|
||||||
<span class="material-icons">zoom_in</span>
|
<span class="material-icons">zoom_in</span>
|
||||||
크게보기
|
크게보기
|
||||||
</button>
|
</button>
|
||||||
@ -142,19 +194,39 @@
|
|||||||
<section class="mb-lg">
|
<section class="mb-lg">
|
||||||
<h3 class="text-headline mb-md">스타일 3: 트렌디</h3>
|
<h3 class="text-headline mb-md">스타일 3: 트렌디</h3>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="image-preview mb-md" style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);">
|
<div
|
||||||
<div class="image-preview-placeholder" style="color: white;">
|
class="image-preview mb-md"
|
||||||
<span class="material-icons" style="font-size: 48px;">trending_up</span>
|
style="
|
||||||
<p class="text-body-small mt-sm" id="style3Title">SNS 팔로우 이벤트</p>
|
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
||||||
<p class="text-caption" style="opacity: 0.9;" id="style3Prize">커피 쿠폰</p>
|
"
|
||||||
|
>
|
||||||
|
<div class="image-preview-placeholder" style="color: white">
|
||||||
|
<span class="material-icons" style="font-size: 48px"
|
||||||
|
>trending_up</span
|
||||||
|
>
|
||||||
|
<p class="text-body-small mt-sm" id="style3Title">
|
||||||
|
SNS 팔로우 이벤트
|
||||||
|
</p>
|
||||||
|
<p class="text-caption" style="opacity: 0.9" id="style3Prize">
|
||||||
|
커피 쿠폰
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input type="radio" name="imageStyle" id="style3" value="trendy" class="form-check-input">
|
<input
|
||||||
|
type="radio"
|
||||||
|
name="imageStyle"
|
||||||
|
id="style3"
|
||||||
|
value="trendy"
|
||||||
|
class="form-check-input"
|
||||||
|
/>
|
||||||
<label for="style3" class="form-check-label">선택</label>
|
<label for="style3" class="form-check-label">선택</label>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-text btn-small preview-btn" data-style="trendy">
|
<button
|
||||||
|
class="btn btn-text btn-small preview-btn"
|
||||||
|
data-style="trendy"
|
||||||
|
>
|
||||||
<span class="material-icons">zoom_in</span>
|
<span class="material-icons">zoom_in</span>
|
||||||
크게보기
|
크게보기
|
||||||
</button>
|
</button>
|
||||||
@ -165,8 +237,12 @@
|
|||||||
<!-- Action Buttons -->
|
<!-- Action Buttons -->
|
||||||
<section class="mb-2xl">
|
<section class="mb-2xl">
|
||||||
<div class="grid grid-cols-2 gap-sm">
|
<div class="grid grid-cols-2 gap-sm">
|
||||||
<button id="skipBtn" class="btn btn-text btn-large">건너뛰기</button>
|
<button id="skipBtn" class="btn btn-text btn-large">
|
||||||
<button id="nextBtn" class="btn btn-primary btn-large" disabled>다음</button>
|
건너뛰기
|
||||||
|
</button>
|
||||||
|
<button id="nextBtn" class="btn btn-primary btn-large" disabled>
|
||||||
|
다음
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
@ -181,7 +257,11 @@
|
|||||||
<button class="fullscreen-close" onclick="closeFullscreen()">
|
<button class="fullscreen-close" onclick="closeFullscreen()">
|
||||||
<span class="material-icons">close</span>
|
<span class="material-icons">close</span>
|
||||||
</button>
|
</button>
|
||||||
<img id="fullscreenImage" class="fullscreen-image" alt="이벤트 이미지 미리보기">
|
<img
|
||||||
|
id="fullscreenImage"
|
||||||
|
class="fullscreen-image"
|
||||||
|
alt="이벤트 이미지 미리보기"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="common.js"></script>
|
<script src="common.js"></script>
|
||||||
@ -191,108 +271,122 @@
|
|||||||
|
|
||||||
// Header 생성
|
// Header 생성
|
||||||
const header = KTEventApp.Navigation.createHeader({
|
const header = KTEventApp.Navigation.createHeader({
|
||||||
title: 'SNS 이미지 생성',
|
title: "SNS 이미지 생성",
|
||||||
showBack: true,
|
showBack: true,
|
||||||
showMenu: false,
|
showMenu: false,
|
||||||
showProfile: false
|
showProfile: false,
|
||||||
});
|
});
|
||||||
document.getElementById('header').appendChild(header);
|
document.getElementById("header").appendChild(header);
|
||||||
|
|
||||||
// Bottom Navigation 생성
|
// Bottom Navigation 생성
|
||||||
const bottomNav = KTEventApp.Navigation.createBottomNav('events');
|
const bottomNav = KTEventApp.Navigation.createBottomNav("events");
|
||||||
document.getElementById('bottomNav').appendChild(bottomNav);
|
document.getElementById("bottomNav").appendChild(bottomNav);
|
||||||
|
|
||||||
// 저장된 데이터 불러오기
|
// 저장된 데이터 불러오기
|
||||||
const recommendation = KTEventApp.Utils.getFromStorage('selected_recommendation') || {
|
const recommendation = KTEventApp.Utils.getFromStorage(
|
||||||
title: 'SNS 팔로우 이벤트',
|
"selected_recommendation"
|
||||||
prize: '커피 쿠폰'
|
) || {
|
||||||
|
title: "SNS 팔로우 이벤트",
|
||||||
|
prize: "커피 쿠폰",
|
||||||
};
|
};
|
||||||
|
|
||||||
// 로딩 시뮬레이션
|
// 로딩 시뮬레이션
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 이미지 생성 완료
|
// 이미지 생성 완료
|
||||||
document.getElementById('loadingState').classList.add('hidden');
|
document.getElementById("loadingState").classList.add("hidden");
|
||||||
document.getElementById('generatedImages').classList.remove('hidden');
|
document.getElementById("generatedImages").classList.remove("hidden");
|
||||||
|
|
||||||
// 데이터 표시
|
// 데이터 표시
|
||||||
document.getElementById('style1Title').textContent = recommendation.title;
|
document.getElementById("style1Title").textContent =
|
||||||
document.getElementById('style1Prize').textContent = recommendation.prize;
|
recommendation.title;
|
||||||
document.getElementById('style2Title').textContent = recommendation.title;
|
document.getElementById("style1Prize").textContent =
|
||||||
document.getElementById('style2Prize').textContent = recommendation.prize;
|
recommendation.prize;
|
||||||
document.getElementById('style3Title').textContent = recommendation.title;
|
document.getElementById("style2Title").textContent =
|
||||||
document.getElementById('style3Prize').textContent = recommendation.prize;
|
recommendation.title;
|
||||||
|
document.getElementById("style2Prize").textContent =
|
||||||
|
recommendation.prize;
|
||||||
|
document.getElementById("style3Title").textContent =
|
||||||
|
recommendation.title;
|
||||||
|
document.getElementById("style3Prize").textContent =
|
||||||
|
recommendation.prize;
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
||||||
// 선택 상태 관리
|
// 선택 상태 관리
|
||||||
let selectedStyle = null;
|
let selectedStyle = null;
|
||||||
|
|
||||||
document.querySelectorAll('input[name="imageStyle"]').forEach(radio => {
|
document.querySelectorAll('input[name="imageStyle"]').forEach((radio) => {
|
||||||
radio.addEventListener('change', function() {
|
radio.addEventListener("change", function () {
|
||||||
selectedStyle = this.value;
|
selectedStyle = this.value;
|
||||||
document.getElementById('nextBtn').disabled = false;
|
document.getElementById("nextBtn").disabled = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 크게보기 버튼
|
// 크게보기 버튼
|
||||||
document.querySelectorAll('.preview-btn').forEach(btn => {
|
document.querySelectorAll(".preview-btn").forEach((btn) => {
|
||||||
btn.addEventListener('click', function() {
|
btn.addEventListener("click", function () {
|
||||||
const style = this.dataset.style;
|
const style = this.dataset.style;
|
||||||
openFullscreen(style);
|
openFullscreen(style);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function openFullscreen(style) {
|
function openFullscreen(style) {
|
||||||
const modal = document.getElementById('fullscreenModal');
|
const modal = document.getElementById("fullscreenModal");
|
||||||
const img = document.getElementById('fullscreenImage');
|
const img = document.getElementById("fullscreenImage");
|
||||||
|
|
||||||
// 실제로는 생성된 이미지 URL을 사용
|
// 실제로는 생성된 이미지 URL을 사용
|
||||||
// 여기서는 placeholder 사용
|
// 여기서는 placeholder 사용
|
||||||
img.src = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800"><rect width="800" height="800" fill="%23f0f0f0"/><text x="50%" y="50%" text-anchor="middle" fill="%23666" font-size="24">' + recommendation.title + '</text></svg>';
|
img.src =
|
||||||
|
'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800"><rect width="800" height="800" fill="%23f0f0f0"/><text x="50%" y="50%" text-anchor="middle" fill="%23666" font-size="24">' +
|
||||||
|
recommendation.title +
|
||||||
|
"</text></svg>";
|
||||||
|
|
||||||
modal.classList.add('active');
|
modal.classList.add("active");
|
||||||
}
|
}
|
||||||
|
|
||||||
window.closeFullscreen = function () {
|
window.closeFullscreen = function () {
|
||||||
document.getElementById('fullscreenModal').classList.remove('active');
|
document.getElementById("fullscreenModal").classList.remove("active");
|
||||||
};
|
};
|
||||||
|
|
||||||
// 배경 클릭 시 닫기
|
// 배경 클릭 시 닫기
|
||||||
document.getElementById('fullscreenModal').addEventListener('click', function(e) {
|
document
|
||||||
|
.getElementById("fullscreenModal")
|
||||||
|
.addEventListener("click", function (e) {
|
||||||
if (e.target === this) {
|
if (e.target === this) {
|
||||||
closeFullscreen();
|
closeFullscreen();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 건너뛰기 버튼
|
// 건너뛰기 버튼
|
||||||
document.getElementById('skipBtn').addEventListener('click', function() {
|
document.getElementById("skipBtn").addEventListener("click", function () {
|
||||||
KTEventApp.Feedback.showModal({
|
KTEventApp.Feedback.showModal({
|
||||||
title: '건너뛰기',
|
title: "건너뛰기",
|
||||||
content: '<p class="text-body">이미지 없이 다음 단계로 진행하시겠습니까?</p>',
|
content:
|
||||||
|
'<p class="text-body">이미지 없이 다음 단계로 진행하시겠습니까?</p>',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: '취소',
|
text: "취소",
|
||||||
variant: 'text',
|
variant: "text",
|
||||||
onClick: function () {
|
onClick: function () {
|
||||||
this.closest('.modal-backdrop').remove();
|
this.closest(".modal-backdrop").remove();
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '확인',
|
text: "확인",
|
||||||
variant: 'primary',
|
variant: "primary",
|
||||||
onClick: function () {
|
onClick: function () {
|
||||||
this.closest('.modal-backdrop').remove();
|
this.closest(".modal-backdrop").remove();
|
||||||
window.location.href = '11-배포채널선택.html';
|
window.location.href = "11-배포채널선택.html";
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 다음 버튼
|
// 다음 버튼
|
||||||
document.getElementById('nextBtn').addEventListener('click', function() {
|
document.getElementById("nextBtn").addEventListener("click", function () {
|
||||||
if (selectedStyle) {
|
if (selectedStyle) {
|
||||||
KTEventApp.Utils.saveToStorage('selected_image_style', selectedStyle);
|
KTEventApp.Utils.saveToStorage("selected_image_style", selectedStyle);
|
||||||
window.location.href = '10-콘텐츠편집.html';
|
window.location.href = "10-콘텐츠편집.html";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,36 +1,56 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>최종 승인 - KT AI 이벤트 마케팅</title>
|
<title>최종 승인 - KT AI 이벤트 마케팅</title>
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css" />
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
<link
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css">
|
rel="stylesheet"
|
||||||
|
href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css"
|
||||||
|
/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="page page-with-header">
|
<div class="page page-with-header">
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div id="header"></div>
|
<div id="header"></div>
|
||||||
|
|
||||||
<div class="container" style="max-width: 600px;">
|
<div class="container" style="max-width: 600px">
|
||||||
<!-- Title Section -->
|
<!-- Title Section -->
|
||||||
<section class="mt-lg mb-lg text-center">
|
<section class="mt-lg mb-lg text-center">
|
||||||
<div class="mb-md">
|
<div class="mb-md">
|
||||||
<span class="material-icons" style="font-size: 64px; color: var(--color-success);">check_circle</span>
|
<span
|
||||||
|
class="material-icons"
|
||||||
|
style="font-size: 64px; color: var(--color-success)"
|
||||||
|
>check_circle</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="text-title-large mb-sm">이벤트를 확인해주세요</h2>
|
<h2 class="text-title-large mb-sm">이벤트를 확인해주세요</h2>
|
||||||
<p class="text-body text-secondary">모든 정보를 검토한 후 배포하세요</p>
|
<p class="text-body text-secondary">
|
||||||
|
모든 정보를 검토한 후 배포하세요
|
||||||
|
</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Event Summary Card -->
|
<!-- Event Summary Card -->
|
||||||
<section class="mb-lg">
|
<section class="mb-lg">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h3 class="text-headline mb-md" id="eventTitle">SNS 팔로우 이벤트</h3>
|
<h3 class="text-headline mb-md" id="eventTitle">
|
||||||
|
SNS 팔로우 이벤트
|
||||||
|
</h3>
|
||||||
|
|
||||||
<div class="flex items-center gap-sm mb-md">
|
<div class="flex items-center gap-sm mb-md">
|
||||||
<span class="event-card-badge badge-scheduled">배포 대기</span>
|
<span class="event-card-badge badge-scheduled">배포 대기</span>
|
||||||
<span class="event-card-badge" style="background: rgba(0, 102, 255, 0.1); color: var(--color-ai-blue);">
|
<span
|
||||||
|
class="event-card-badge"
|
||||||
|
style="
|
||||||
|
background: rgba(0, 102, 255, 0.1);
|
||||||
|
color: var(--color-ai-blue);
|
||||||
|
"
|
||||||
|
>
|
||||||
AI 추천
|
AI 추천
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -39,7 +59,9 @@
|
|||||||
<div class="grid grid-cols-2 gap-md text-body-small">
|
<div class="grid grid-cols-2 gap-md text-body-small">
|
||||||
<div>
|
<div>
|
||||||
<p class="text-tertiary mb-xs">이벤트 기간</p>
|
<p class="text-tertiary mb-xs">이벤트 기간</p>
|
||||||
<p class="text-semibold" id="eventPeriod">2025.02.01 ~ 2025.02.28</p>
|
<p class="text-semibold" id="eventPeriod">
|
||||||
|
2025.02.01 ~ 2025.02.28
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p class="text-tertiary mb-xs">목표 참여자</p>
|
<p class="text-tertiary mb-xs">목표 참여자</p>
|
||||||
@ -51,7 +73,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p class="text-tertiary mb-xs">예상 ROI</p>
|
<p class="text-tertiary mb-xs">예상 ROI</p>
|
||||||
<p class="text-semibold text-kt-red" id="estimatedROI">520%</p>
|
<p class="text-semibold text-kt-red" id="estimatedROI">
|
||||||
|
520%
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -69,7 +93,10 @@
|
|||||||
<p class="text-body-small text-tertiary mb-xs">이벤트 제목</p>
|
<p class="text-body-small text-tertiary mb-xs">이벤트 제목</p>
|
||||||
<p class="text-body" id="detailTitle">SNS 팔로우 이벤트</p>
|
<p class="text-body" id="detailTitle">SNS 팔로우 이벤트</p>
|
||||||
</div>
|
</div>
|
||||||
<button class="header-icon-btn" onclick="window.location.href='10-콘텐츠편집.html'">
|
<button
|
||||||
|
class="header-icon-btn"
|
||||||
|
onclick="window.location.href='10-콘텐츠편집.html'"
|
||||||
|
>
|
||||||
<span class="material-icons">edit</span>
|
<span class="material-icons">edit</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -82,7 +109,10 @@
|
|||||||
<p class="text-body-small text-tertiary mb-xs">경품</p>
|
<p class="text-body-small text-tertiary mb-xs">경품</p>
|
||||||
<p class="text-body" id="detailPrize">커피 쿠폰</p>
|
<p class="text-body" id="detailPrize">커피 쿠폰</p>
|
||||||
</div>
|
</div>
|
||||||
<button class="header-icon-btn" onclick="window.location.href='10-콘텐츠편집.html'">
|
<button
|
||||||
|
class="header-icon-btn"
|
||||||
|
onclick="window.location.href='10-콘텐츠편집.html'"
|
||||||
|
>
|
||||||
<span class="material-icons">edit</span>
|
<span class="material-icons">edit</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -94,11 +124,14 @@
|
|||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<p class="text-body-small text-tertiary mb-xs">이벤트 설명</p>
|
<p class="text-body-small text-tertiary mb-xs">이벤트 설명</p>
|
||||||
<p class="text-body" id="detailDescription">
|
<p class="text-body" id="detailDescription">
|
||||||
SNS를 팔로우하고 커피 쿠폰을 받으세요!<br>
|
SNS를 팔로우하고 커피 쿠폰을 받으세요!<br />
|
||||||
많은 참여 부탁드립니다.
|
많은 참여 부탁드립니다.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<button class="header-icon-btn" onclick="window.location.href='10-콘텐츠편집.html'">
|
<button
|
||||||
|
class="header-icon-btn"
|
||||||
|
onclick="window.location.href='10-콘텐츠편집.html'"
|
||||||
|
>
|
||||||
<span class="material-icons">edit</span>
|
<span class="material-icons">edit</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -121,19 +154,34 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div id="channels" class="flex flex-wrap gap-sm">
|
<div id="channels" class="flex flex-wrap gap-sm">
|
||||||
<span class="event-card-badge badge-active">
|
<span class="event-card-badge badge-active">
|
||||||
<span class="material-icons" style="font-size: 16px; vertical-align: middle;">language</span>
|
<span
|
||||||
|
class="material-icons"
|
||||||
|
style="font-size: 16px; vertical-align: middle"
|
||||||
|
>language</span
|
||||||
|
>
|
||||||
홈페이지
|
홈페이지
|
||||||
</span>
|
</span>
|
||||||
<span class="event-card-badge badge-active">
|
<span class="event-card-badge badge-active">
|
||||||
<span class="material-icons" style="font-size: 16px; vertical-align: middle;">chat_bubble</span>
|
<span
|
||||||
|
class="material-icons"
|
||||||
|
style="font-size: 16px; vertical-align: middle"
|
||||||
|
>chat_bubble</span
|
||||||
|
>
|
||||||
카카오톡
|
카카오톡
|
||||||
</span>
|
</span>
|
||||||
<span class="event-card-badge badge-active">
|
<span class="event-card-badge badge-active">
|
||||||
<span class="material-icons" style="font-size: 16px; vertical-align: middle;">share</span>
|
<span
|
||||||
|
class="material-icons"
|
||||||
|
style="font-size: 16px; vertical-align: middle"
|
||||||
|
>share</span
|
||||||
|
>
|
||||||
Instagram
|
Instagram
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-text btn-small mt-md" onclick="window.location.href='11-배포채널선택.html'">
|
<button
|
||||||
|
class="btn btn-text btn-small mt-md"
|
||||||
|
onclick="window.location.href='11-배포채널선택.html'"
|
||||||
|
>
|
||||||
<span class="material-icons">edit</span>
|
<span class="material-icons">edit</span>
|
||||||
채널 수정하기
|
채널 수정하기
|
||||||
</button>
|
</button>
|
||||||
@ -142,31 +190,45 @@
|
|||||||
|
|
||||||
<!-- Terms Agreement -->
|
<!-- Terms Agreement -->
|
||||||
<section class="mb-xl">
|
<section class="mb-xl">
|
||||||
<div class="card" style="background: var(--color-gray-50);">
|
<div class="card" style="background: var(--color-gray-50)">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input type="checkbox" id="agreeTerms" class="form-check-input" required>
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
id="agreeTerms"
|
||||||
|
class="form-check-input"
|
||||||
|
required
|
||||||
|
/>
|
||||||
<label for="agreeTerms" class="form-check-label">
|
<label for="agreeTerms" class="form-check-label">
|
||||||
이벤트 약관 및 개인정보 처리방침에 동의합니다 <span class="text-kt-red">(필수)</span>
|
이벤트 약관 및 개인정보 처리방침에 동의합니다
|
||||||
|
<span class="text-kt-red">(필수)</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<a href="#" class="text-body-small text-kt-red mt-sm inline-block" id="viewTerms">약관 보기</a>
|
<a
|
||||||
|
href="#"
|
||||||
|
class="text-body-small text-kt-red mt-sm inline-block"
|
||||||
|
id="viewTerms"
|
||||||
|
>약관 보기</a
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- Action Buttons -->
|
<!-- Action Buttons -->
|
||||||
<section class="mb-2xl">
|
<section class="mb-2xl">
|
||||||
<button id="approveBtn" class="btn btn-primary btn-large btn-full mb-sm" disabled>
|
<button
|
||||||
|
id="approveBtn"
|
||||||
|
class="btn btn-primary btn-large btn-full mb-sm"
|
||||||
|
disabled
|
||||||
|
>
|
||||||
<span class="material-icons">rocket_launch</span>
|
<span class="material-icons">rocket_launch</span>
|
||||||
배포하기
|
배포하기
|
||||||
</button>
|
</button>
|
||||||
<button id="saveBtn" class="btn btn-secondary btn-large btn-full mb-sm">
|
<button
|
||||||
|
id="saveBtn"
|
||||||
|
class="btn btn-secondary btn-large btn-full mb-sm"
|
||||||
|
>
|
||||||
<span class="material-icons">save</span>
|
<span class="material-icons">save</span>
|
||||||
임시저장
|
임시저장
|
||||||
</button>
|
</button>
|
||||||
<button id="backBtn" class="btn btn-text btn-large btn-full">
|
|
||||||
<span class="material-icons">arrow_back</span>
|
|
||||||
이전으로
|
|
||||||
</button>
|
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -181,38 +243,44 @@
|
|||||||
|
|
||||||
// Header 생성
|
// Header 생성
|
||||||
const header = KTEventApp.Navigation.createHeader({
|
const header = KTEventApp.Navigation.createHeader({
|
||||||
title: '최종 승인',
|
title: "최종 승인",
|
||||||
showBack: true,
|
showBack: true,
|
||||||
showMenu: false,
|
showMenu: false,
|
||||||
showProfile: false
|
showProfile: false,
|
||||||
});
|
});
|
||||||
document.getElementById('header').appendChild(header);
|
document.getElementById("header").appendChild(header);
|
||||||
|
|
||||||
// Bottom Navigation 생성
|
// Bottom Navigation 생성
|
||||||
const bottomNav = KTEventApp.Navigation.createBottomNav('events');
|
const bottomNav = KTEventApp.Navigation.createBottomNav("events");
|
||||||
document.getElementById('bottomNav').appendChild(bottomNav);
|
document.getElementById("bottomNav").appendChild(bottomNav);
|
||||||
|
|
||||||
// 저장된 데이터 불러오기
|
// 저장된 데이터 불러오기
|
||||||
const recommendation = KTEventApp.Utils.getFromStorage('selected_recommendation') || {
|
const recommendation = KTEventApp.Utils.getFromStorage(
|
||||||
title: 'SNS 팔로우 이벤트',
|
"selected_recommendation"
|
||||||
prize: '커피 쿠폰'
|
) || {
|
||||||
|
title: "SNS 팔로우 이벤트",
|
||||||
|
prize: "커피 쿠폰",
|
||||||
};
|
};
|
||||||
|
|
||||||
// 데이터 표시
|
// 데이터 표시
|
||||||
document.getElementById('eventTitle').textContent = recommendation.title;
|
document.getElementById("eventTitle").textContent = recommendation.title;
|
||||||
document.getElementById('detailTitle').textContent = recommendation.title;
|
document.getElementById("detailTitle").textContent = recommendation.title;
|
||||||
document.getElementById('detailPrize').textContent = recommendation.prize;
|
document.getElementById("detailPrize").textContent = recommendation.prize;
|
||||||
|
|
||||||
// 약관 동의 체크박스
|
// 약관 동의 체크박스
|
||||||
document.getElementById('agreeTerms').addEventListener('change', function(e) {
|
document
|
||||||
document.getElementById('approveBtn').disabled = !e.target.checked;
|
.getElementById("agreeTerms")
|
||||||
|
.addEventListener("change", function (e) {
|
||||||
|
document.getElementById("approveBtn").disabled = !e.target.checked;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 약관 보기
|
// 약관 보기
|
||||||
document.getElementById('viewTerms').addEventListener('click', function(e) {
|
document
|
||||||
|
.getElementById("viewTerms")
|
||||||
|
.addEventListener("click", function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
KTEventApp.Feedback.showModal({
|
KTEventApp.Feedback.showModal({
|
||||||
title: '이벤트 약관',
|
title: "이벤트 약관",
|
||||||
content: `
|
content: `
|
||||||
<div class="p-md" style="max-height: 400px; overflow-y: auto;">
|
<div class="p-md" style="max-height: 400px; overflow-y: auto;">
|
||||||
<h4 class="text-headline mb-md">제1조 (목적)</h4>
|
<h4 class="text-headline mb-md">제1조 (목적)</h4>
|
||||||
@ -233,21 +301,24 @@
|
|||||||
`,
|
`,
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: '확인',
|
text: "확인",
|
||||||
variant: 'primary',
|
variant: "primary",
|
||||||
onClick: function () {
|
onClick: function () {
|
||||||
this.closest('.modal-backdrop').remove();
|
this.closest(".modal-backdrop").remove();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 배포하기 버튼
|
// 배포하기 버튼
|
||||||
document.getElementById('approveBtn').addEventListener('click', function() {
|
document
|
||||||
|
.getElementById("approveBtn")
|
||||||
|
.addEventListener("click", function () {
|
||||||
const button = this;
|
const button = this;
|
||||||
button.disabled = true;
|
button.disabled = true;
|
||||||
button.innerHTML = '<span class="material-icons">hourglass_empty</span> 배포 중...';
|
button.innerHTML =
|
||||||
|
'<span class="material-icons">hourglass_empty</span> 배포 중...';
|
||||||
|
|
||||||
// 배포 시뮬레이션
|
// 배포 시뮬레이션
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -270,25 +341,25 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`
|
`,
|
||||||
});
|
});
|
||||||
}, 2000);
|
}, 2000);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 임시저장 버튼
|
// 임시저장 버튼
|
||||||
document.getElementById('saveBtn').addEventListener('click', function() {
|
document.getElementById("saveBtn").addEventListener("click", function () {
|
||||||
// 현재 데이터 저장
|
// 현재 데이터 저장
|
||||||
const draftData = {
|
const draftData = {
|
||||||
...recommendation,
|
...recommendation,
|
||||||
savedAt: new Date().toISOString()
|
savedAt: new Date().toISOString(),
|
||||||
};
|
};
|
||||||
|
|
||||||
KTEventApp.Utils.saveToStorage('event_draft', draftData);
|
KTEventApp.Utils.saveToStorage("event_draft", draftData);
|
||||||
KTEventApp.Feedback.showToast('임시저장되었습니다');
|
KTEventApp.Feedback.showToast("임시저장되었습니다");
|
||||||
});
|
});
|
||||||
|
|
||||||
// 이전으로 버튼
|
// 이전으로 버튼
|
||||||
document.getElementById('backBtn').addEventListener('click', function() {
|
document.getElementById("backBtn").addEventListener("click", function () {
|
||||||
window.history.back();
|
window.history.back();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user