- 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:
+15
-4
@@ -24,6 +24,13 @@ const router = createRouter({
|
||||
name: 'demo-locked',
|
||||
component: () => import('../views/DemoLockedView.vue'),
|
||||
},
|
||||
{
|
||||
// 유료 멤버십 안내/업그레이드 (로그인 필요, 무료 회원도 접근 가능)
|
||||
path: '/upgrade',
|
||||
name: 'upgrade',
|
||||
component: () => import('../views/UpgradeView.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: '/users',
|
||||
name: 'users',
|
||||
@@ -85,13 +92,13 @@ const router = createRouter({
|
||||
path: '/account/stats',
|
||||
name: 'account-stats',
|
||||
component: () => import('../views/account/AccountDashboardView.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
meta: { requiresAuth: true, requiresPremium: true },
|
||||
},
|
||||
{
|
||||
path: '/account/tags',
|
||||
name: 'account-tags',
|
||||
component: () => import('../views/account/AccountTagView.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
meta: { requiresAuth: true, requiresPremium: true },
|
||||
},
|
||||
{
|
||||
path: '/account/wallets',
|
||||
@@ -109,13 +116,13 @@ const router = createRouter({
|
||||
path: '/account/budget',
|
||||
name: 'account-budget',
|
||||
component: () => import('../views/account/BudgetView.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
meta: { requiresAuth: true, requiresPremium: true },
|
||||
},
|
||||
{
|
||||
path: '/account/recurrings',
|
||||
name: 'account-recurrings',
|
||||
component: () => import('../views/account/RecurringView.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
meta: { requiresAuth: true, requiresPremium: true },
|
||||
},
|
||||
// 설정 (앱 하단 내비게이션 → 설정)
|
||||
{
|
||||
@@ -161,6 +168,10 @@ router.beforeEach((to, from) => {
|
||||
if (to.meta.requiresAdmin && auth.user?.role !== 'ADMIN') {
|
||||
return { name: 'home' }
|
||||
}
|
||||
// 유료 전용 페이지 — 무료 회원은 업그레이드 안내로
|
||||
if (to.meta.requiresPremium && !auth.isPremium) {
|
||||
return { name: 'upgrade' }
|
||||
}
|
||||
})
|
||||
|
||||
// 새 배포로 청크 해시가 바뀐 뒤, 캐시된 옛 index.html 이 삭제된 옛 청크를 부르면
|
||||
|
||||
Reference in New Issue
Block a user