- auth 스토어 isPremium/isAdmin 추가 (plan===PREMIUM 또는 관리자) - 사이드바: 통계·고정지출·예산·태그 메뉴에 무료 회원 잠금 배지(🔒) - 라우트 가드: 유료 전용 화면(requiresPremium) → 무료 회원은 /upgrade - UpgradeView: 무료/유료 기능 비교 + 업그레이드 안내 - http 인터셉터: 403 PREMIUM_REQUIRED → premium:required 이벤트 → 업그레이드 화면 - 무료 화면의 유료 API 호출 차단(홈 예산·내역 태그·OCR·카드알림 게이팅) - 회원관리: 멤버십 컬럼 + 무료/유료 토글(관리자) - 설정: 데이터 백업/복구 유료 게이팅, 계정정보에 멤버십 표시 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,171 @@
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
|
||||
const router = useRouter()
|
||||
const auth = useAuthStore()
|
||||
const isPremium = computed(() => auth.isPremium)
|
||||
|
||||
// 무료 / 유료 기능 비교 (docs/plan-membership-tiers.md 기준)
|
||||
const freeFeatures = [
|
||||
'가계부 내역 기록 · 조회',
|
||||
'계좌 관리 (개수 제한 없음)',
|
||||
'자주 쓰는 내역',
|
||||
'월별 수입/지출 요약',
|
||||
'기본 분류',
|
||||
'게시판 · 다크 모드',
|
||||
]
|
||||
const premiumFeatures = [
|
||||
'전체 통계 (분류별·추이·자산)',
|
||||
'예산 설정',
|
||||
'고정 지출 자동 반영',
|
||||
'영수증 OCR 인식',
|
||||
'카드 알림 자동 인식',
|
||||
'투자 · 자산 관리',
|
||||
'태그 · 소분류 무제한',
|
||||
'데이터 백업 / 복구 (엑셀)',
|
||||
'광고 제거',
|
||||
]
|
||||
|
||||
function goBack() {
|
||||
if (window.history.length > 1) router.back()
|
||||
else router.push('/account/entries')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="upgrade">
|
||||
<header class="up-head">
|
||||
<div class="crown">👑</div>
|
||||
<h1 v-if="isPremium">유료 멤버십 이용 중</h1>
|
||||
<h1 v-else>유료 멤버십으로 더 많은 기능을</h1>
|
||||
<p v-if="isPremium" class="sub">모든 프리미엄 기능을 사용할 수 있습니다. 감사합니다!</p>
|
||||
<p v-else class="sub">통계·예산·자동화·백업까지, 가계부를 200% 활용하세요.</p>
|
||||
</header>
|
||||
|
||||
<div class="plans">
|
||||
<section class="plan">
|
||||
<h2>무료</h2>
|
||||
<ul>
|
||||
<li v-for="f in freeFeatures" :key="f"><span class="dot ok">✓</span>{{ f }}</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="plan premium">
|
||||
<h2>유료 <span class="badge">PREMIUM</span></h2>
|
||||
<ul>
|
||||
<li v-for="f in premiumFeatures" :key="f"><span class="dot pro">★</span>{{ f }}</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="cta">
|
||||
<p v-if="!isPremium" class="notice">
|
||||
결제 기능은 준비 중입니다. 먼저 사용해 보고 싶다면 관리자에게 문의해 주세요.
|
||||
</p>
|
||||
<button type="button" class="ghost" @click="goBack">돌아가기</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.upgrade {
|
||||
max-width: 760px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.up-head {
|
||||
text-align: center;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
.crown {
|
||||
font-size: 2.4rem;
|
||||
}
|
||||
.up-head h1 {
|
||||
font-size: 1.4rem;
|
||||
margin: 0.4rem 0 0.3rem;
|
||||
color: var(--color-heading);
|
||||
}
|
||||
.sub {
|
||||
color: var(--color-text);
|
||||
opacity: 0.8;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
.plans {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 1rem;
|
||||
}
|
||||
.plan {
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 12px;
|
||||
padding: 1.1rem 1.2rem;
|
||||
background: var(--color-background-soft);
|
||||
}
|
||||
.plan.premium {
|
||||
border-color: hsla(40, 90%, 55%, 0.7);
|
||||
background: hsla(40, 90%, 55%, 0.06);
|
||||
}
|
||||
.plan h2 {
|
||||
font-size: 1.05rem;
|
||||
margin: 0 0 0.8rem;
|
||||
color: var(--color-heading);
|
||||
}
|
||||
.badge {
|
||||
font-size: 0.65rem;
|
||||
font-weight: 700;
|
||||
padding: 0.1rem 0.4rem;
|
||||
border-radius: 999px;
|
||||
background: hsla(40, 90%, 50%, 0.9);
|
||||
color: #3a2a00;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.plan ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.55rem;
|
||||
}
|
||||
.plan li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.dot {
|
||||
flex: none;
|
||||
width: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
.dot.ok {
|
||||
color: hsla(160, 100%, 37%, 1);
|
||||
}
|
||||
.dot.pro {
|
||||
color: hsla(40, 90%, 50%, 1);
|
||||
}
|
||||
.cta {
|
||||
margin-top: 1.6rem;
|
||||
text-align: center;
|
||||
}
|
||||
.notice {
|
||||
font-size: 0.88rem;
|
||||
color: var(--color-text);
|
||||
opacity: 0.85;
|
||||
margin-bottom: 0.9rem;
|
||||
}
|
||||
.ghost {
|
||||
padding: 0.55rem 1.4rem;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 8px;
|
||||
background: var(--color-background);
|
||||
color: var(--color-text);
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
}
|
||||
@media (max-width: 560px) {
|
||||
.plans {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user