2026-07-11 07:50:47 +09:00
|
|
|
<template>
|
|
|
|
|
<q-layout view="hHh lpR fFf">
|
|
|
|
|
<q-header class="bg-primary text-white safe-top">
|
|
|
|
|
<q-toolbar>
|
|
|
|
|
<q-toolbar-title class="text-weight-bold">
|
|
|
|
|
<q-icon name="pets" class="q-mr-sm" />산책갈개
|
|
|
|
|
</q-toolbar-title>
|
|
|
|
|
<q-chip dense color="white" text-color="primary" icon="bolt">
|
|
|
|
|
{{ tierLabel }}
|
|
|
|
|
</q-chip>
|
2026-07-11 08:35:00 +09:00
|
|
|
<q-btn flat round dense icon="account_circle">
|
|
|
|
|
<q-menu>
|
|
|
|
|
<q-list style="min-width: 160px">
|
|
|
|
|
<q-item>
|
|
|
|
|
<q-item-section>
|
|
|
|
|
<q-item-label class="text-weight-medium">{{ auth.member?.nickname }}</q-item-label>
|
|
|
|
|
<q-item-label caption>{{ auth.member?.email }}</q-item-label>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
<q-separator />
|
|
|
|
|
<q-item clickable v-close-popup @click="onLogout">
|
|
|
|
|
<q-item-section avatar><q-icon name="logout" /></q-item-section>
|
|
|
|
|
<q-item-section>로그아웃</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
</q-list>
|
|
|
|
|
</q-menu>
|
|
|
|
|
</q-btn>
|
2026-07-11 07:50:47 +09:00
|
|
|
</q-toolbar>
|
|
|
|
|
</q-header>
|
|
|
|
|
|
|
|
|
|
<q-page-container>
|
|
|
|
|
<router-view />
|
|
|
|
|
</q-page-container>
|
|
|
|
|
|
|
|
|
|
<!-- FREE 티어 하단 배너 광고 -->
|
|
|
|
|
<AdBanner />
|
|
|
|
|
|
|
|
|
|
<q-footer class="bg-white text-grey-8 safe-bottom">
|
|
|
|
|
<q-tabs
|
|
|
|
|
v-model="tab"
|
|
|
|
|
active-color="primary"
|
|
|
|
|
indicator-color="primary"
|
|
|
|
|
class="text-grey-6"
|
|
|
|
|
>
|
|
|
|
|
<q-route-tab name="home" :to="{ name: 'home' }" icon="map" label="산책 스팟" />
|
|
|
|
|
<q-route-tab name="profile" :to="{ name: 'profile' }" icon="pets" label="우리 개" />
|
|
|
|
|
</q-tabs>
|
|
|
|
|
</q-footer>
|
|
|
|
|
</q-layout>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { computed, ref } from 'vue'
|
2026-07-11 08:35:00 +09:00
|
|
|
import { useRouter } from 'vue-router'
|
2026-07-11 07:50:47 +09:00
|
|
|
import AdBanner from '@/components/AdBanner.vue'
|
|
|
|
|
import { useSubscriptionStore } from '@/stores/subscription'
|
2026-07-11 08:35:00 +09:00
|
|
|
import { useAuthStore } from '@/stores/auth'
|
2026-07-11 09:00:19 +09:00
|
|
|
import { useDogsStore } from '@/stores/dogs'
|
2026-07-11 07:50:47 +09:00
|
|
|
|
|
|
|
|
const tab = ref('home')
|
|
|
|
|
const subscription = useSubscriptionStore()
|
2026-07-11 08:35:00 +09:00
|
|
|
const auth = useAuthStore()
|
2026-07-11 09:00:19 +09:00
|
|
|
const dogs = useDogsStore()
|
2026-07-11 08:35:00 +09:00
|
|
|
const router = useRouter()
|
2026-07-11 07:50:47 +09:00
|
|
|
|
|
|
|
|
const tierLabel = computed(() => {
|
|
|
|
|
switch (subscription.tier) {
|
|
|
|
|
case 'PREMIUM':
|
|
|
|
|
return 'PREMIUM'
|
|
|
|
|
case 'AD_FREE':
|
|
|
|
|
return '광고제거'
|
|
|
|
|
default:
|
|
|
|
|
return 'FREE'
|
|
|
|
|
}
|
|
|
|
|
})
|
2026-07-11 08:35:00 +09:00
|
|
|
|
|
|
|
|
async function onLogout() {
|
|
|
|
|
await auth.logout()
|
2026-07-11 09:00:19 +09:00
|
|
|
dogs.reset()
|
2026-07-11 08:35:00 +09:00
|
|
|
router.replace({ name: 'login' })
|
|
|
|
|
}
|
2026-07-11 07:50:47 +09:00
|
|
|
</script>
|