feat: PWA 세션 유지 자동적립 + 메타 태그 + 설치 유도 배너

- 세션 설정: 90일 유지, SameSite=Lax (QR 스캔 시 쿠키 전송)
- 적립 성공 시 세션에 유저 정보 저장 (3곳)
- /claim 자동적립: 세션에 유저가 있으면 입력 없이 바로 적립
- /logout 라우트 추가, 마이페이지 헤더에 로그아웃 버튼
- /sw.js, /privacy 라우트 추가
- 고객용 템플릿 6개에 PWA 메타 태그 + 서비스 워커 등록
- 적립 성공 화면에 PWA 설치 유도 배너 (iOS/Android 분기)
- session 변수명 충돌 수정 (db_session으로 변경)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
thug0bin
2026-02-25 08:52:19 +09:00
parent 62502c81b3
commit ed2a3f28bf
7 changed files with 242 additions and 8 deletions

View File

@@ -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>