Compare commits
3 Commits
62632cb7b8
...
ed2a3f28bf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed2a3f28bf | ||
|
|
62502c81b3 | ||
|
|
d1a5964bb7 |
@ -34,6 +34,11 @@ from db.dbsetup import DatabaseManager
|
||||
app = Flask(__name__)
|
||||
app.secret_key = 'pharmacy-qr-mileage-secret-key-2026'
|
||||
|
||||
# 세션 설정 (PWA 자동적립 지원)
|
||||
app.config['SESSION_COOKIE_SECURE'] = not app.debug # HTTPS 전용 (로컬 개발 시 제외)
|
||||
app.config['SESSION_COOKIE_SAMESITE'] = 'Lax' # QR 스캔 시 쿠키 전송 허용
|
||||
app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(days=90) # 3개월 유지
|
||||
|
||||
# 데이터베이스 매니저
|
||||
db_manager = DatabaseManager()
|
||||
|
||||
@ -599,10 +604,33 @@ def claim():
|
||||
if not success:
|
||||
return render_template('error.html', message=message)
|
||||
|
||||
# 세션에 로그인된 유저가 있으면 자동 적립 (PWA)
|
||||
if 'logged_in_user_id' in session:
|
||||
auto_user_id = session['logged_in_user_id']
|
||||
conn = db_manager.get_sqlite_connection()
|
||||
cursor = conn.cursor()
|
||||
cursor.execute("SELECT id, nickname, phone, mileage_balance FROM users WHERE id = ?", (auto_user_id,))
|
||||
auto_user = cursor.fetchone()
|
||||
|
||||
if auto_user:
|
||||
auto_success, auto_msg, auto_balance = claim_mileage(auto_user_id, token_info)
|
||||
if auto_success:
|
||||
return render_template('claim_kakao_success.html',
|
||||
points=token_info['claimable_points'],
|
||||
balance=auto_balance,
|
||||
phone=auto_user['phone'],
|
||||
name=auto_user['nickname'])
|
||||
return render_template('error.html', message=auto_msg)
|
||||
else:
|
||||
# 유저가 삭제됨 - 세션 클리어
|
||||
session.pop('logged_in_user_id', None)
|
||||
session.pop('logged_in_phone', None)
|
||||
session.pop('logged_in_name', None)
|
||||
|
||||
# MSSQL에서 구매 품목 조회
|
||||
sale_items = []
|
||||
try:
|
||||
session = db_manager.get_session('PM_PRES')
|
||||
db_session = db_manager.get_session('PM_PRES')
|
||||
sale_sub_query = text("""
|
||||
SELECT
|
||||
ISNULL(G.GoodsName, '(약품명 없음)') AS goods_name,
|
||||
@ -613,7 +641,7 @@ def claim():
|
||||
WHERE S.SL_NO_order = :transaction_id
|
||||
ORDER BY S.DrugCode
|
||||
""")
|
||||
rows = session.execute(sale_sub_query, {'transaction_id': transaction_id}).fetchall()
|
||||
rows = db_session.execute(sale_sub_query, {'transaction_id': transaction_id}).fetchall()
|
||||
sale_items = [
|
||||
{'name': r.goods_name, 'qty': int(r.quantity or 0), 'total': int(r.total or 0)}
|
||||
for r in rows
|
||||
@ -688,6 +716,12 @@ def api_claim():
|
||||
'message': message
|
||||
}), 500
|
||||
|
||||
# 세션에 유저 정보 저장 (PWA 자동적립용)
|
||||
session.permanent = True
|
||||
session['logged_in_user_id'] = user_id
|
||||
session['logged_in_phone'] = phone
|
||||
session['logged_in_name'] = name
|
||||
|
||||
return jsonify({
|
||||
'success': True,
|
||||
'message': message,
|
||||
@ -858,6 +892,12 @@ def claim_kakao_callback():
|
||||
if not success:
|
||||
return render_template('error.html', message=msg)
|
||||
|
||||
# 세션에 유저 정보 저장 (PWA 자동적립용)
|
||||
session.permanent = True
|
||||
session['logged_in_user_id'] = user_id
|
||||
session['logged_in_phone'] = kakao_phone
|
||||
session['logged_in_name'] = kakao_name
|
||||
|
||||
return render_template('claim_kakao_success.html',
|
||||
points=token_info['claimable_points'],
|
||||
balance=new_balance,
|
||||
@ -923,6 +963,12 @@ def api_claim_kakao():
|
||||
if not success:
|
||||
return jsonify({'success': False, 'message': message}), 500
|
||||
|
||||
# 세션에 유저 정보 저장 (PWA 자동적립용)
|
||||
session.permanent = True
|
||||
session['logged_in_user_id'] = user_id
|
||||
session['logged_in_phone'] = phone
|
||||
session['logged_in_name'] = name
|
||||
|
||||
return jsonify({
|
||||
'success': True,
|
||||
'message': message,
|
||||
@ -1003,6 +1049,34 @@ def my_page():
|
||||
return render_template('my_page.html', user=user, transactions=transactions)
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# PWA / 공통 라우트
|
||||
# ============================================================================
|
||||
|
||||
@app.route('/sw.js')
|
||||
def service_worker():
|
||||
"""서비스 워커를 루트 경로에서 제공 (scope='/' 허용)"""
|
||||
return app.send_static_file('sw.js'), 200, {
|
||||
'Content-Type': 'application/javascript',
|
||||
'Service-Worker-Allowed': '/'
|
||||
}
|
||||
|
||||
|
||||
@app.route('/privacy')
|
||||
def privacy():
|
||||
"""개인정보 처리방침"""
|
||||
return render_template('privacy.html')
|
||||
|
||||
|
||||
@app.route('/logout')
|
||||
def logout():
|
||||
"""세션 로그아웃"""
|
||||
session.pop('logged_in_user_id', None)
|
||||
session.pop('logged_in_phone', None)
|
||||
session.pop('logged_in_name', None)
|
||||
return redirect('/')
|
||||
|
||||
|
||||
@app.route('/admin/transaction/<transaction_id>')
|
||||
def admin_transaction_detail(transaction_id):
|
||||
"""거래 세부 내역 조회 (MSSQL)"""
|
||||
|
||||
BIN
backend/static/icons/icon-192.png
Normal file
BIN
backend/static/icons/icon-192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
BIN
backend/static/icons/icon-512.png
Normal file
BIN
backend/static/icons/icon-512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
25
backend/static/manifest.json
Normal file
25
backend/static/manifest.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "청춘약국 마일리지",
|
||||
"short_name": "청춘약국",
|
||||
"description": "청춘약국 QR 마일리지 적립 서비스",
|
||||
"start_url": "/my-page",
|
||||
"display": "standalone",
|
||||
"background_color": "#f5f7fa",
|
||||
"theme_color": "#6366f1",
|
||||
"orientation": "portrait",
|
||||
"lang": "ko",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/static/icons/icon-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/icon-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
}
|
||||
]
|
||||
}
|
||||
63
backend/static/sw.js
Normal file
63
backend/static/sw.js
Normal file
@ -0,0 +1,63 @@
|
||||
const CACHE_NAME = 'chungchun-pharmacy-v1';
|
||||
const STATIC_ASSETS = [
|
||||
'/static/js/lottie.min.js',
|
||||
'/static/animations/ai-loading.json',
|
||||
'/static/icons/icon-192.png',
|
||||
'/static/icons/icon-512.png'
|
||||
];
|
||||
|
||||
// Install: pre-cache static assets
|
||||
self.addEventListener('install', (event) => {
|
||||
event.waitUntil(
|
||||
caches.open(CACHE_NAME).then((cache) => cache.addAll(STATIC_ASSETS))
|
||||
);
|
||||
self.skipWaiting();
|
||||
});
|
||||
|
||||
// Activate: clean old caches
|
||||
self.addEventListener('activate', (event) => {
|
||||
event.waitUntil(
|
||||
caches.keys().then((keys) =>
|
||||
Promise.all(
|
||||
keys.filter((key) => key !== CACHE_NAME).map((key) => caches.delete(key))
|
||||
)
|
||||
)
|
||||
);
|
||||
self.clients.claim();
|
||||
});
|
||||
|
||||
// Fetch: cache-first for static, network-only for dynamic
|
||||
self.addEventListener('fetch', (event) => {
|
||||
const url = new URL(event.request.url);
|
||||
|
||||
// Skip non-GET requests
|
||||
if (event.request.method !== 'GET') return;
|
||||
|
||||
// Skip dynamic routes entirely
|
||||
if (url.pathname.startsWith('/api/') ||
|
||||
url.pathname.startsWith('/admin') ||
|
||||
url.pathname.startsWith('/claim') ||
|
||||
url.pathname.startsWith('/my-page') ||
|
||||
url.pathname === '/privacy' ||
|
||||
url.pathname === '/logout' ||
|
||||
url.pathname === '/') {
|
||||
return;
|
||||
}
|
||||
|
||||
// Cache-first for static assets and fonts
|
||||
if (url.pathname.startsWith('/static/') ||
|
||||
url.hostname === 'fonts.googleapis.com' ||
|
||||
url.hostname === 'fonts.gstatic.com') {
|
||||
event.respondWith(
|
||||
caches.match(event.request).then((cached) => {
|
||||
return cached || fetch(event.request).then((response) => {
|
||||
if (response.ok) {
|
||||
const clone = response.clone();
|
||||
caches.open(CACHE_NAME).then((cache) => cache.put(event.request, clone));
|
||||
}
|
||||
return response;
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
@ -3,6 +3,13 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="theme-color" content="#6366f1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="apple-mobile-web-app-title" content="청춘약국">
|
||||
<link rel="manifest" href="/static/manifest.json">
|
||||
<link rel="apple-touch-icon" href="/static/icons/icon-192.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/static/icons/icon-192.png">
|
||||
<title>포인트 적립 - 청춘약국</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
@ -548,7 +555,7 @@
|
||||
<label class="checkbox-container">
|
||||
<input type="checkbox" id="privacyConsent" required>
|
||||
<span class="checkmark"></span>
|
||||
<span class="consent-text">개인정보 수집·이용 동의</span>
|
||||
<span class="consent-text"><a href="/privacy" target="_blank" style="color: #6366f1; text-decoration: underline;">개인정보 수집·이용</a> 동의</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@ -575,6 +582,13 @@
|
||||
</a>
|
||||
|
||||
<div class="alert error" id="alertMsg"></div>
|
||||
|
||||
<div style="text-align: center; padding: 16px 0 8px;">
|
||||
<a href="/privacy" target="_blank"
|
||||
style="color: #adb5bd; font-size: 12px; text-decoration: none; letter-spacing: -0.2px;">
|
||||
개인정보 처리방침
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -594,6 +608,17 @@
|
||||
<a href="/" class="btn-secondary">홈으로</a>
|
||||
<a href="#" class="btn-primary" id="btnMyPage">내역 보기</a>
|
||||
</div>
|
||||
|
||||
<!-- PWA 설치 유도 배너 -->
|
||||
<div id="installBanner" style="display:none; margin-top:24px; padding:16px 20px; background:#f8f9fa; border-radius:14px; text-align:left;">
|
||||
<div style="font-size:14px; font-weight:700; color:#212529; margin-bottom:6px; letter-spacing:-0.3px;">
|
||||
홈 화면에 추가하면 더 편해요!
|
||||
</div>
|
||||
<div id="installDesc" style="font-size:13px; color:#868e96; line-height:1.6; letter-spacing:-0.2px;"></div>
|
||||
<button id="installBtn" style="display:none; margin-top:10px; width:100%; padding:12px; background:linear-gradient(135deg,#6366f1,#8b5cf6); color:#fff; border:none; border-radius:10px; font-size:14px; font-weight:600; cursor:pointer; letter-spacing:-0.2px;">
|
||||
앱 설치하기
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -707,5 +732,40 @@
|
||||
successScreen.style.display = 'block';
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
if('serviceWorker' in navigator){navigator.serviceWorker.register('/sw.js').catch(()=>{});}
|
||||
|
||||
// PWA 설치 유도
|
||||
(function() {
|
||||
const banner = document.getElementById('installBanner');
|
||||
const desc = document.getElementById('installDesc');
|
||||
const btn = document.getElementById('installBtn');
|
||||
if (!banner) return;
|
||||
|
||||
if (window.matchMedia('(display-mode: standalone)').matches || navigator.standalone) return;
|
||||
|
||||
let deferredPrompt = null;
|
||||
window.addEventListener('beforeinstallprompt', function(e) {
|
||||
e.preventDefault();
|
||||
deferredPrompt = e;
|
||||
desc.textContent = '다음부터 QR 스캔하면 입력 없이 바로 적립됩니다.';
|
||||
btn.style.display = 'block';
|
||||
banner.style.display = 'block';
|
||||
});
|
||||
btn.addEventListener('click', function() {
|
||||
if (deferredPrompt) {
|
||||
deferredPrompt.prompt();
|
||||
deferredPrompt.userChoice.then(function() { banner.style.display = 'none'; });
|
||||
}
|
||||
});
|
||||
|
||||
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
|
||||
const isSafari = /Safari/.test(navigator.userAgent) && !/CriOS|FxiOS/.test(navigator.userAgent);
|
||||
if (isIOS && isSafari && !deferredPrompt) {
|
||||
desc.innerHTML = '하단 <strong style="color:#495057;">공유 버튼</strong> ➜ <strong style="color:#495057;">홈 화면에 추가</strong>를 누르면<br>다음부터 QR만 찍으면 바로 적립!';
|
||||
banner.style.display = 'block';
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -3,6 +3,13 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="theme-color" content="#6366f1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="apple-mobile-web-app-title" content="청춘약국">
|
||||
<link rel="manifest" href="/static/manifest.json">
|
||||
<link rel="apple-touch-icon" href="/static/icons/icon-192.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/static/icons/icon-192.png">
|
||||
<title>카카오 적립 - 청춘약국</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
@ -347,6 +354,13 @@
|
||||
</form>
|
||||
|
||||
<div class="alert error" id="alertMsg"></div>
|
||||
|
||||
<div style="text-align: center; padding: 16px 0 8px;">
|
||||
<a href="/privacy" target="_blank"
|
||||
style="color: #adb5bd; font-size: 12px; text-decoration: none; letter-spacing: -0.2px;">
|
||||
개인정보 처리방침
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -438,5 +452,6 @@
|
||||
document.getElementById('successScreen').style.display = 'block';
|
||||
}
|
||||
</script>
|
||||
<script>if('serviceWorker' in navigator){navigator.serviceWorker.register('/sw.js').catch(()=>{});}</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -3,6 +3,13 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="theme-color" content="#6366f1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="apple-mobile-web-app-title" content="청춘약국">
|
||||
<link rel="manifest" href="/static/manifest.json">
|
||||
<link rel="apple-touch-icon" href="/static/icons/icon-192.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/static/icons/icon-192.png">
|
||||
<title>적립 완료 - 청춘약국</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
@ -182,6 +189,57 @@
|
||||
<a href="/" class="btn-secondary">홈으로</a>
|
||||
<a href="/my-page?phone={{ phone }}" class="btn-primary">내역 보기</a>
|
||||
</div>
|
||||
|
||||
<!-- PWA 설치 유도 배너 -->
|
||||
<div id="installBanner" style="display:none; margin-top:24px; padding:16px 20px; background:#f8f9fa; border-radius:14px; text-align:left;">
|
||||
<div style="font-size:14px; font-weight:700; color:#212529; margin-bottom:6px; letter-spacing:-0.3px;">
|
||||
홈 화면에 추가하면 더 편해요!
|
||||
</div>
|
||||
<div id="installDesc" style="font-size:13px; color:#868e96; line-height:1.6; letter-spacing:-0.2px;"></div>
|
||||
<button id="installBtn" style="display:none; margin-top:10px; width:100%; padding:12px; background:linear-gradient(135deg,#6366f1,#8b5cf6); color:#fff; border:none; border-radius:10px; font-size:14px; font-weight:600; cursor:pointer; letter-spacing:-0.2px;">
|
||||
앱 설치하기
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
if('serviceWorker' in navigator){navigator.serviceWorker.register('/sw.js').catch(()=>{});}
|
||||
|
||||
// PWA 설치 유도
|
||||
(function() {
|
||||
const banner = document.getElementById('installBanner');
|
||||
const desc = document.getElementById('installDesc');
|
||||
const btn = document.getElementById('installBtn');
|
||||
|
||||
// 이미 PWA로 실행 중이면 표시 안 함
|
||||
if (window.matchMedia('(display-mode: standalone)').matches || navigator.standalone) return;
|
||||
|
||||
let deferredPrompt = null;
|
||||
|
||||
// Android Chrome: beforeinstallprompt 이벤트
|
||||
window.addEventListener('beforeinstallprompt', function(e) {
|
||||
e.preventDefault();
|
||||
deferredPrompt = e;
|
||||
desc.textContent = '다음부터 QR 스캔하면 입력 없이 바로 적립됩니다.';
|
||||
btn.style.display = 'block';
|
||||
banner.style.display = 'block';
|
||||
});
|
||||
|
||||
btn.addEventListener('click', function() {
|
||||
if (deferredPrompt) {
|
||||
deferredPrompt.prompt();
|
||||
deferredPrompt.userChoice.then(function() { banner.style.display = 'none'; });
|
||||
}
|
||||
});
|
||||
|
||||
// iOS Safari 감지
|
||||
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
|
||||
const isSafari = /Safari/.test(navigator.userAgent) && !/CriOS|FxiOS/.test(navigator.userAgent);
|
||||
if (isIOS && isSafari && !deferredPrompt) {
|
||||
desc.innerHTML = '하단 <strong style="color:#495057;">공유 버튼</strong> ➜ <strong style="color:#495057;">홈 화면에 추가</strong>를 누르면<br>다음부터 QR만 찍으면 바로 적립!';
|
||||
banner.style.display = 'block';
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -3,6 +3,13 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="theme-color" content="#6366f1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="apple-mobile-web-app-title" content="청춘약국">
|
||||
<link rel="manifest" href="/static/manifest.json">
|
||||
<link rel="apple-touch-icon" href="/static/icons/icon-192.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/static/icons/icon-192.png">
|
||||
<title>오류 - 청춘약국</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
@ -98,5 +105,6 @@
|
||||
<a href="/" class="btn-home">홈으로 이동</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>if('serviceWorker' in navigator){navigator.serviceWorker.register('/sw.js').catch(()=>{});}</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -3,6 +3,13 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="theme-color" content="#6366f1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="apple-mobile-web-app-title" content="청춘약국">
|
||||
<link rel="manifest" href="/static/manifest.json">
|
||||
<link rel="apple-touch-icon" href="/static/icons/icon-192.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/static/icons/icon-192.png">
|
||||
<title>마이페이지 - 청춘약국</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
@ -271,11 +278,14 @@
|
||||
<div class="app-container">
|
||||
<div class="header-top">
|
||||
<div class="header-title">마이페이지</div>
|
||||
<a href="/my-page" class="btn-logout">다른 번호로 조회</a>
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<a href="/my-page" class="btn-logout">다른 번호</a>
|
||||
<a href="/my-page/kakao/start" class="btn-logout" style="display: flex; align-items: center; gap: 4px; background: #FEE500; color: #191919; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;">
|
||||
<svg width="12" height="12" viewBox="0 0 20 20" fill="none"><path d="M10 1C4.477 1 0 4.477 0 8.5c0 2.58 1.693 4.847 4.243 6.134l-1.084 3.97a.3.3 0 00.457.338L7.7 16.392c.75.112 1.52.17 2.3.17 5.523 0 10-3.477 10-7.562C20 4.477 15.523 1 10 1z" fill="#191919"/></svg>
|
||||
카카오 조회
|
||||
카카오
|
||||
</a>
|
||||
<a href="/logout" class="btn-logout" style="font-size: 12px; opacity: 0.7;">로그아웃</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header-profile">
|
||||
@ -382,5 +392,6 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>if('serviceWorker' in navigator){navigator.serviceWorker.register('/sw.js').catch(()=>{});}</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -3,6 +3,13 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="theme-color" content="#6366f1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="apple-mobile-web-app-title" content="청춘약국">
|
||||
<link rel="manifest" href="/static/manifest.json">
|
||||
<link rel="apple-touch-icon" href="/static/icons/icon-192.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/static/icons/icon-192.png">
|
||||
<title>마이페이지 - 청춘약국</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
@ -206,5 +213,6 @@
|
||||
|
||||
phoneInput.focus();
|
||||
</script>
|
||||
<script>if('serviceWorker' in navigator){navigator.serviceWorker.register('/sw.js').catch(()=>{});}</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
256
backend/templates/privacy.html
Normal file
256
backend/templates/privacy.html
Normal file
@ -0,0 +1,256 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="theme-color" content="#6366f1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="apple-mobile-web-app-title" content="청춘약국">
|
||||
<link rel="manifest" href="/static/manifest.json">
|
||||
<link rel="apple-touch-icon" href="/static/icons/icon-192.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/static/icons/icon-192.png">
|
||||
<title>개인정보 처리방침 - 청춘약국</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||
background: #f5f7fa;
|
||||
min-height: 100vh;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
background: #ffffff;
|
||||
max-width: 420px;
|
||||
margin: 0 auto;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
|
||||
padding: 0 24px;
|
||||
height: 56px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
color: #ffffff;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.3px;
|
||||
}
|
||||
|
||||
.btn-back {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
letter-spacing: -0.2px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: #212529;
|
||||
margin: 28px 0 12px 0;
|
||||
letter-spacing: -0.3px;
|
||||
}
|
||||
|
||||
.section-title:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #495057;
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
font-weight: 400;
|
||||
letter-spacing: -0.2px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 20px;
|
||||
margin: 8px 0 12px 0;
|
||||
}
|
||||
|
||||
li {
|
||||
color: #495057;
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
font-weight: 400;
|
||||
letter-spacing: -0.2px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.info-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 12px 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.info-table th,
|
||||
.info-table td {
|
||||
border: 1px solid #e9ecef;
|
||||
padding: 10px 12px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.info-table th {
|
||||
background: #f8f9fa;
|
||||
color: #495057;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.info-table td {
|
||||
color: #495057;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.effective-date {
|
||||
color: #868e96;
|
||||
font-size: 13px;
|
||||
margin-top: 32px;
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid #e9ecef;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.header {
|
||||
padding-top: env(safe-area-inset-top, 0px);
|
||||
height: calc(56px + env(safe-area-inset-top, 0px));
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="app-container">
|
||||
<div class="header">
|
||||
<div class="header-title">개인정보 처리방침</div>
|
||||
<a href="javascript:history.back()" class="btn-back">돌아가기</a>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<p>청춘약국(이하 "약국")은 「개인정보 보호법」에 따라 고객의 개인정보를 보호하고 이와 관련한 고충을 신속하고 원활하게 처리할 수 있도록 다음과 같이 개인정보 처리방침을 수립·공개합니다.</p>
|
||||
|
||||
<div class="section-title">1. 수집하는 개인정보 항목 및 수집 방법</div>
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<th>수집 방법</th>
|
||||
<th>수집 항목</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>직접 입력</td>
|
||||
<td>전화번호, 이름</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>카카오 로그인</td>
|
||||
<td>카카오 계정 식별자(ID), 닉네임, 프로필 이미지, 이메일, 이름</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>자동 수집</td>
|
||||
<td>구매 내역(품목명, 수량, 금액, 일시)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="section-title">2. 개인정보의 수집 및 이용 목적</div>
|
||||
<ul>
|
||||
<li>마일리지 포인트 적립 및 관리</li>
|
||||
<li>고객 식별 및 본인 확인</li>
|
||||
<li>적립 내역 조회 서비스 제공</li>
|
||||
<li>구매 이력 기반 맞춤 서비스 제공</li>
|
||||
</ul>
|
||||
|
||||
<div class="section-title">3. 개인정보의 보유 및 이용 기간</div>
|
||||
<p>약국은 개인정보 수집 및 이용 목적이 달성된 후에는 해당 정보를 지체 없이 파기합니다. 단, 관계 법령에 의해 보존이 필요한 경우에는 해당 법령에서 정한 기간 동안 보관합니다.</p>
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<th>보존 항목</th>
|
||||
<th>보존 기간</th>
|
||||
<th>근거 법령</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>거래 기록</td>
|
||||
<td>5년</td>
|
||||
<td>부가가치세법</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>회원 정보</td>
|
||||
<td>탈퇴 시까지</td>
|
||||
<td>개인정보 보호법</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="section-title">4. 개인정보의 제3자 제공</div>
|
||||
<p>약국은 고객의 개인정보를 제3자에게 제공하지 않습니다. 카카오 로그인은 본인 인증 목적으로만 사용되며, 약국에서 카카오에 고객 정보를 제공하지 않습니다.</p>
|
||||
|
||||
<div class="section-title">5. 개인정보의 파기 절차 및 방법</div>
|
||||
<ul>
|
||||
<li>전자적 파일: 복구 및 재생이 불가능한 기술적 방법으로 삭제</li>
|
||||
<li>종이 문서: 분쇄기로 분쇄하거나 소각</li>
|
||||
</ul>
|
||||
|
||||
<div class="section-title">6. 정보주체의 권리·의무 및 행사 방법</div>
|
||||
<p>고객은 언제든지 자신의 개인정보에 대해 다음과 같은 권리를 행사할 수 있습니다.</p>
|
||||
<ul>
|
||||
<li>개인정보 열람 요구</li>
|
||||
<li>오류 등이 있을 경우 정정 요구</li>
|
||||
<li>삭제 요구</li>
|
||||
<li>처리 정지 요구</li>
|
||||
</ul>
|
||||
<p>위 권리 행사는 약국에 직접 방문하시거나, 아래 연락처로 문의해주시기 바랍니다.</p>
|
||||
|
||||
<div class="section-title">7. 개인정보 보호 책임자</div>
|
||||
<table class="info-table">
|
||||
<tr>
|
||||
<th>상호</th>
|
||||
<td>청춘약국</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>책임자</th>
|
||||
<td>약국 대표</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>연락처</th>
|
||||
<td>약국 방문 또는 전화 문의</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="section-title">8. 개인정보 자동 수집 장치의 설치·운영 및 거부</div>
|
||||
<p>약국은 서비스 이용 과정에서 세션 쿠키를 사용하여 로그인 상태를 유지합니다. 쿠키는 브라우저 설정을 통해 거부할 수 있으나, 이 경우 자동 적립 기능 등 일부 서비스 이용이 제한될 수 있습니다.</p>
|
||||
|
||||
<div class="effective-date">
|
||||
시행일: 2026년 2월 25일
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('/sw.js').catch(()=>{});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue
Block a user