feat: 생년월일 필드 추가 + 카카오 스코프 확장 + 채널 연동 문서
- signup.html: 수집 목적 안내 카드, 생년월일(선택) 필드, 필수/선택 배지 - app.py: /api/signup에 birthday 처리, get_or_create_user birthday 파라미터 - mileage_schema.sql: users 테이블 birthday 컬럼 추가 - dbsetup.py: 기존 DB 마이그레이션 (ALTER TABLE ADD birthday) - kakao_client.py: scope에 phone_number,birthday,birthyear 추가 - privacy.html: 항목별 수집 목적 테이블, 필수/선택 구분, 9항 신설 - kakao-phone-request.md: 전화번호+생일 스코프 신청 사유 문서 - kakao-channel-integration.md: 채널 API 분석 및 알림톡 로드맵 - kakao-chanell-rest-api.md: 카카오 채널 REST API 원문 참고 문서 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -128,6 +128,18 @@
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
padding: 1px 5px;
|
||||
border-radius: 3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.badge-req { background: #fff0f0; color: #e03131; }
|
||||
.badge-opt { background: #f0f4ff; color: #6366f1; }
|
||||
|
||||
.effective-date {
|
||||
color: #868e96;
|
||||
font-size: 13px;
|
||||
@@ -160,28 +172,57 @@
|
||||
<tr>
|
||||
<th>수집 방법</th>
|
||||
<th>수집 항목</th>
|
||||
<th>필수/선택</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>직접 입력</td>
|
||||
<td>직접 입력<br>(회원가입)</td>
|
||||
<td>전화번호, 이름</td>
|
||||
<td><span class="badge badge-req">필수</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>직접 입력<br>(회원가입)</td>
|
||||
<td>생년월일</td>
|
||||
<td><span class="badge badge-opt">선택</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>카카오 로그인</td>
|
||||
<td>카카오 계정 식별자(ID), 닉네임, 프로필 이미지, 이메일, 이름</td>
|
||||
<td>카카오 계정 식별자(ID), 닉네임, 프로필 이미지, 이메일, 이름, 전화번호, 생년월일</td>
|
||||
<td><span class="badge badge-req">필수</span> / <span class="badge badge-opt">선택</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>자동 수집</td>
|
||||
<td>구매 내역(품목명, 수량, 금액, 일시)</td>
|
||||
<td><span class="badge badge-req">필수</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="section-title">2. 개인정보의 수집 및 이용 목적</div>
|
||||
<ul>
|
||||
<li>마일리지 포인트 적립 및 관리</li>
|
||||
<li>고객 식별 및 본인 확인</li>
|
||||
<li>적립 내역 조회 서비스 제공</li>
|
||||
<li>구매 이력 기반 맞춤 서비스 제공</li>
|
||||
</ul>
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<th>수집 항목</th>
|
||||
<th>이용 목적</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>전화번호</td>
|
||||
<td>마일리지 적립 계정의 고유 식별자, 포인트 조회 시 본인 확인, 약국 방문 시 포인트 사용을 위한 본인 확인</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>이름</td>
|
||||
<td>동명이인 구분 및 약국 방문 시 본인 확인, 적립 내역 안내</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>생년월일</td>
|
||||
<td>생일 기념 포인트 2배 적립 이벤트, 연령대별 맞춤 건강 정보 및 제품 추천 서비스 제공</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>카카오 계정 정보</td>
|
||||
<td>간편 로그인 및 자동 적립 기능 지원, 기존 회원과의 계정 연동</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>구매 내역</td>
|
||||
<td>마일리지 포인트 적립 금액 산정, 적립 내역 조회 서비스 제공</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="section-title">3. 개인정보의 보유 및 이용 기간</div>
|
||||
<p>약국은 개인정보 수집 및 이용 목적이 달성된 후에는 해당 정보를 지체 없이 파기합니다. 단, 관계 법령에 의해 보존이 필요한 경우에는 해당 법령에서 정한 기간 동안 보관합니다.</p>
|
||||
@@ -241,6 +282,9 @@
|
||||
<div class="section-title">8. 개인정보 자동 수집 장치의 설치·운영 및 거부</div>
|
||||
<p>약국은 서비스 이용 과정에서 세션 쿠키를 사용하여 로그인 상태를 유지합니다. 쿠키는 브라우저 설정을 통해 거부할 수 있으나, 이 경우 자동 적립 기능 등 일부 서비스 이용이 제한될 수 있습니다.</p>
|
||||
|
||||
<div class="section-title">9. 선택 정보 미제공에 따른 불이익</div>
|
||||
<p>생년월일 등 선택 항목을 제공하지 않더라도 마일리지 적립·조회 등 기본 서비스 이용에는 제한이 없습니다. 다만 생일 기념 포인트 이벤트, 연령대별 맞춤 추천 등 부가 서비스를 받으실 수 없습니다.</p>
|
||||
|
||||
<div class="effective-date">
|
||||
시행일: 2026년 2월 25일
|
||||
</div>
|
||||
|
||||
@@ -78,18 +78,47 @@
|
||||
}
|
||||
|
||||
.input-group {
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.input-group label {
|
||||
display: block;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #495057;
|
||||
margin-bottom: 8px;
|
||||
margin-bottom: 6px;
|
||||
letter-spacing: -0.2px;
|
||||
}
|
||||
|
||||
.label-badge {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
letter-spacing: -0.2px;
|
||||
}
|
||||
|
||||
.badge-required {
|
||||
background: #fff0f0;
|
||||
color: #e03131;
|
||||
}
|
||||
|
||||
.badge-optional {
|
||||
background: #f0f4ff;
|
||||
color: #6366f1;
|
||||
}
|
||||
|
||||
.input-purpose {
|
||||
font-size: 12px;
|
||||
color: #868e96;
|
||||
margin-bottom: 8px;
|
||||
line-height: 1.5;
|
||||
letter-spacing: -0.2px;
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
.input-group input {
|
||||
width: 100%;
|
||||
padding: 16px;
|
||||
@@ -129,6 +158,94 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.birthday-wrapper {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.birthday-wrapper select {
|
||||
flex: 1;
|
||||
padding: 16px 12px;
|
||||
border: 1.5px solid #e9ecef;
|
||||
border-radius: 12px;
|
||||
font-size: 15px;
|
||||
font-family: inherit;
|
||||
color: #212529;
|
||||
background: #fff;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23868e96' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 12px center;
|
||||
}
|
||||
|
||||
.birthday-wrapper select:focus {
|
||||
outline: none;
|
||||
border-color: #6366f1;
|
||||
}
|
||||
|
||||
.birthday-wrapper select.placeholder {
|
||||
color: #adb5bd;
|
||||
}
|
||||
|
||||
/* 수집 항목 안내 카드 */
|
||||
.info-card {
|
||||
background: #f8f9fa;
|
||||
border-radius: 14px;
|
||||
padding: 20px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.info-card-title {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
color: #495057;
|
||||
margin-bottom: 12px;
|
||||
letter-spacing: -0.2px;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.info-item:last-child { margin-bottom: 0; }
|
||||
|
||||
.info-item-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.info-item-icon.blue { background: rgba(99, 102, 241, 0.1); }
|
||||
.info-item-icon.green { background: rgba(16, 185, 129, 0.1); }
|
||||
.info-item-icon.pink { background: rgba(244, 63, 94, 0.1); }
|
||||
|
||||
.info-item-text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.info-item-label {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #495057;
|
||||
letter-spacing: -0.2px;
|
||||
}
|
||||
|
||||
.info-item-desc {
|
||||
font-size: 12px;
|
||||
color: #868e96;
|
||||
line-height: 1.5;
|
||||
letter-spacing: -0.2px;
|
||||
}
|
||||
|
||||
.privacy-consent {
|
||||
margin: 24px 0;
|
||||
}
|
||||
@@ -346,17 +463,51 @@
|
||||
<div class="form-title">회원가입</div>
|
||||
<div class="form-desc">
|
||||
청춘약국 마일리지 서비스에 가입하세요.<br>
|
||||
영수증 QR 스캔으로 포인트를 적립할 수 있습니다.
|
||||
영수증 QR 스캔으로 구매금액의 3%를 적립할 수 있습니다.
|
||||
</div>
|
||||
|
||||
<!-- 수집 항목 안내 카드 -->
|
||||
<div class="info-card">
|
||||
<div class="info-card-title">수집 항목 및 이용 목적</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-icon blue">📱</div>
|
||||
<div class="info-item-text">
|
||||
<div class="info-item-label">전화번호 (필수)</div>
|
||||
<div class="info-item-desc">마일리지 적립 계정의 고유 식별자로 사용됩니다. 포인트 조회 및 사용 시 본인 확인에 필요합니다.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-icon green">👤</div>
|
||||
<div class="info-item-text">
|
||||
<div class="info-item-label">이름 (필수)</div>
|
||||
<div class="info-item-desc">동명이인 구분 및 약국 방문 시 본인 확인에 사용됩니다.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-item-icon pink">🎂</div>
|
||||
<div class="info-item-text">
|
||||
<div class="info-item-label">생년월일 (선택)</div>
|
||||
<div class="info-item-desc">생일 기념 포인트 2배 적립 이벤트 및 연령대별 맞춤 건강 정보 제공에 활용됩니다.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="formSignup" onsubmit="return false;">
|
||||
<div class="input-group">
|
||||
<label for="name">이름</label>
|
||||
<label for="name">
|
||||
이름
|
||||
<span class="label-badge badge-required">필수</span>
|
||||
</label>
|
||||
<div class="input-purpose">약국 방문 시 본인 확인 및 동명이인 구분에 사용됩니다.</div>
|
||||
<input type="text" id="name" placeholder="이름을 입력하세요" autocomplete="name" required>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label for="phone">전화번호</label>
|
||||
<label for="phone">
|
||||
전화번호
|
||||
<span class="label-badge badge-required">필수</span>
|
||||
</label>
|
||||
<div class="input-purpose">마일리지 적립·조회의 고유 식별자로 사용됩니다.</div>
|
||||
<div class="phone-wrapper">
|
||||
<span class="phone-prefix">010 -</span>
|
||||
<input type="tel" id="phone"
|
||||
@@ -368,12 +519,31 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<label>
|
||||
생년월일
|
||||
<span class="label-badge badge-optional">선택</span>
|
||||
</label>
|
||||
<div class="input-purpose">생일 기념 포인트 2배 적립 및 연령대별 맞춤 건강 정보 제공에 활용됩니다.</div>
|
||||
<div class="birthday-wrapper">
|
||||
<select id="birthYear" class="placeholder">
|
||||
<option value="">년도</option>
|
||||
</select>
|
||||
<select id="birthMonth" class="placeholder">
|
||||
<option value="">월</option>
|
||||
</select>
|
||||
<select id="birthDay" class="placeholder">
|
||||
<option value="">일</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="privacy-consent">
|
||||
<label class="checkbox-container">
|
||||
<input type="checkbox" id="privacyConsent" required>
|
||||
<span class="consent-text">
|
||||
<a href="/privacy" target="_blank">개인정보 수집·이용</a>에 동의합니다.
|
||||
<br><span style="font-size:12px; color:#868e96;">전화번호, 이름을 마일리지 적립·조회 목적으로 수집합니다.</span>
|
||||
<br><span style="font-size:12px; color:#868e96;">전화번호, 이름(필수), 생년월일(선택)을 마일리지 적립·조회 및 맞춤 서비스 목적으로 수집합니다.</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
@@ -418,6 +588,41 @@
|
||||
<script>
|
||||
if('serviceWorker' in navigator){navigator.serviceWorker.register('/sw.js').catch(()=>{});}
|
||||
|
||||
// 생년월일 셀렉트 초기화
|
||||
(function() {
|
||||
var yearSel = document.getElementById('birthYear');
|
||||
var monthSel = document.getElementById('birthMonth');
|
||||
var daySel = document.getElementById('birthDay');
|
||||
var currentYear = new Date().getFullYear();
|
||||
|
||||
for (var y = currentYear; y >= 1920; y--) {
|
||||
var opt = document.createElement('option');
|
||||
opt.value = y;
|
||||
opt.textContent = y + '년';
|
||||
yearSel.appendChild(opt);
|
||||
}
|
||||
for (var m = 1; m <= 12; m++) {
|
||||
var opt = document.createElement('option');
|
||||
opt.value = m < 10 ? '0' + m : '' + m;
|
||||
opt.textContent = m + '월';
|
||||
monthSel.appendChild(opt);
|
||||
}
|
||||
for (var d = 1; d <= 31; d++) {
|
||||
var opt = document.createElement('option');
|
||||
opt.value = d < 10 ? '0' + d : '' + d;
|
||||
opt.textContent = d + '일';
|
||||
daySel.appendChild(opt);
|
||||
}
|
||||
|
||||
// 선택 시 placeholder 클래스 제거
|
||||
[yearSel, monthSel, daySel].forEach(function(sel) {
|
||||
sel.addEventListener('change', function() {
|
||||
if (this.value) this.classList.remove('placeholder');
|
||||
else this.classList.add('placeholder');
|
||||
});
|
||||
});
|
||||
})();
|
||||
|
||||
const phoneInput = document.getElementById('phone');
|
||||
const form = document.getElementById('formSignup');
|
||||
const alertMsg = document.getElementById('alertMsg');
|
||||
@@ -437,6 +642,15 @@
|
||||
const phone = '010' + raw;
|
||||
const consent = document.getElementById('privacyConsent').checked;
|
||||
|
||||
// 생년월일 (선택)
|
||||
const birthYear = document.getElementById('birthYear').value;
|
||||
const birthMonth = document.getElementById('birthMonth').value;
|
||||
const birthDay = document.getElementById('birthDay').value;
|
||||
let birthday = null;
|
||||
if (birthYear && birthMonth && birthDay) {
|
||||
birthday = birthYear + '-' + birthMonth + '-' + birthDay;
|
||||
}
|
||||
|
||||
if (!name) return showAlert('이름을 입력해주세요.');
|
||||
if (raw.length < 7) return showAlert('올바른 전화번호를 입력해주세요.');
|
||||
if (!consent) return showAlert('개인정보 수집·이용에 동의해주세요.');
|
||||
@@ -446,10 +660,13 @@
|
||||
btn.textContent = '가입 중...';
|
||||
|
||||
try {
|
||||
const body = { name, phone };
|
||||
if (birthday) body.birthday = birthday;
|
||||
|
||||
const res = await fetch('/api/signup', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ name, phone })
|
||||
body: JSON.stringify(body)
|
||||
});
|
||||
const data = await res.json();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user