Files
hjsq_h5/src/views/MainView.vue
T
2026-11-05 12:01:36 +07:00

68 lines
1.7 KiB
Vue

<template>
<div class="main_wrapper">
<div class="main_content">
<router-view v-slot="{ Component }">
<keep-alive :include="mainViewKeep">
<component :is="Component" />
</keep-alive>
</router-view>
</div>
<!-- 右侧导航抽屉 -->
<Drawer elType="home" />
<Drawer elType="darkNet" />
<AccountCredentialsPopup v-if="isMine" />
<TabBar />
<PaymentGuidePopup
:show="vipContentGuideVisible"
:guide="vipContentGuide"
:scene="vipContentGuideScene"
@close="closeVipContentGuide"
/>
</div>
</template>
<script lang="ts">
export default {
name: 'mainView',
};
</script>
<script lang="ts" setup>
import { useGlobalStore } from '@/stores/global';
import { useConfigStore } from '@/stores/config';
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import PaymentGuidePopup from '@/components/PaymentGuidePopup/index.vue';
import { useVipContentUpdateGuideOnMainTabs } from '@/hooks/useVipContentUpdateGuideOnMainTabs';
const route = useRoute();
const globalStore = useGlobalStore();
const configStore = useConfigStore();
const {
visible: vipContentGuideVisible,
guide: vipContentGuide,
scene: vipContentGuideScene,
closeGuide: closeVipContentGuide,
} = useVipContentUpdateGuideOnMainTabs();
const mainViewKeep = computed(() => {
return globalStore.$state.mainViewKeep;
});
const backgroundTheme = computed(() => {
return configStore.appConfig.backgroundTheme;
});
const isMine = computed(() => {
let path = route.path;
if (path.indexOf('mine') > 0) {
return true;
}
return false;
});
</script>
<style lang="scss" scoped>
.main_wrapper {
height: 100%;
.main_content {
height: $contentHeight;
position: relative;
}
}
</style>