mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 15:36:49 +08:00
添加发现页面及相关路由和菜单项
This commit is contained in:
@@ -0,0 +1,50 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { DiscoverTabs } from '@/router/menu'
|
||||||
|
import router from '@/router'
|
||||||
|
import TheMovieDbView from '@/views/discover/TheMovieDbView.vue'
|
||||||
|
import DoubanView from '@/views/discover/DoubanView.vue'
|
||||||
|
import BangumiView from '@/views/discover/BangumiView.vue'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const activeTab = ref(route.query.tab)
|
||||||
|
|
||||||
|
function jumpTab(tab: string) {
|
||||||
|
router.push('/subscribe/discover?tab=' + tab)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<VTabs v-model="activeTab" show-arrows>
|
||||||
|
<VTab v-for="item in DiscoverTabs" :value="item.tab" @to="jumpTab(item.tab)">
|
||||||
|
<div class="mx-5">
|
||||||
|
{{ item.title }}
|
||||||
|
</div>
|
||||||
|
</VTab>
|
||||||
|
</VTabs>
|
||||||
|
|
||||||
|
<VWindow v-model="activeTab" class="mt-5 disable-tab-transition" :touch="false">
|
||||||
|
<VWindowItem value="themoviedb">
|
||||||
|
<transition name="fade-slide" appear>
|
||||||
|
<div>
|
||||||
|
<TheMovieDbView />
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
</VWindowItem>
|
||||||
|
<VWindowItem value="douban">
|
||||||
|
<transition name="fade-slide" appear>
|
||||||
|
<div>
|
||||||
|
<DoubanView />
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
</VWindowItem>
|
||||||
|
<VWindowItem value="bangumi">
|
||||||
|
<transition name="fade-slide" appear>
|
||||||
|
<div>
|
||||||
|
<BangumiView />
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
</VWindowItem>
|
||||||
|
</VWindow>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -68,7 +68,6 @@ const viewList = reactive<{ apipath: string; linkurl: string; title: string }[]>
|
|||||||
title: '豆瓣全球剧集榜',
|
title: '豆瓣全球剧集榜',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -142,7 +142,6 @@ onUnmounted(() => {
|
|||||||
<div v-if="isRefreshed">
|
<div v-if="isRefreshed">
|
||||||
<VFab
|
<VFab
|
||||||
v-if="viewType === 'list'"
|
v-if="viewType === 'list'"
|
||||||
class="mb-12"
|
|
||||||
icon="mdi-view-grid"
|
icon="mdi-view-grid"
|
||||||
location="bottom"
|
location="bottom"
|
||||||
size="x-large"
|
size="x-large"
|
||||||
|
|||||||
@@ -18,12 +18,18 @@ function jumpTab(tab: string) {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<VTabs v-model="activeTab">
|
<VTabs v-model="activeTab" show-arrows>
|
||||||
<VTab v-if="subType == '电影'" v-for="item in SubscribeMovieTabs" :value="item.tab" @to="jumpTab(item.tab)">
|
<VTab v-if="subType == '电影'" v-for="item in SubscribeMovieTabs" :value="item.tab" @to="jumpTab(item.tab)">
|
||||||
<span class="mx-5">{{ item.title }}</span>
|
<div class="flex align-center mx-5">
|
||||||
|
<VIcon size="20" start :icon="item.icon" />
|
||||||
|
{{ item.title }}
|
||||||
|
</div>
|
||||||
</VTab>
|
</VTab>
|
||||||
<VTab v-if="subType == '电视剧'" v-for="item in SubscribeTvTabs" :value="item.tab" @to="jumpTab(item.tab)">
|
<VTab v-if="subType == '电视剧'" v-for="item in SubscribeTvTabs" :value="item.tab" @to="jumpTab(item.tab)">
|
||||||
<span class="mx-5">{{ item.title }}</span>
|
<div class="flex align-center mx-5">
|
||||||
|
<VIcon size="20" start :icon="item.icon" />
|
||||||
|
{{ item.title }}
|
||||||
|
</div>
|
||||||
</VTab>
|
</VTab>
|
||||||
</VTabs>
|
</VTabs>
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,14 @@ const router = createRouter({
|
|||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/discover',
|
||||||
|
component: () => import('../pages/discover.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: true,
|
||||||
|
requiresAuth: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/resource',
|
path: '/resource',
|
||||||
component: () => import('../pages/resource.vue'),
|
component: () => import('../pages/resource.vue'),
|
||||||
|
|||||||
+32
-5
@@ -16,6 +16,14 @@ export const SystemNavMenus = [
|
|||||||
admin: false,
|
admin: false,
|
||||||
footer: true,
|
footer: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '探索',
|
||||||
|
icon: 'mdi-apple-safari',
|
||||||
|
to: '/discover',
|
||||||
|
header: '发现',
|
||||||
|
admin: false,
|
||||||
|
footer: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '资源搜索',
|
title: '资源搜索',
|
||||||
icon: 'mdi-magnify',
|
icon: 'mdi-magnify',
|
||||||
@@ -169,12 +177,12 @@ export const SubscribeMovieTabs = [
|
|||||||
{
|
{
|
||||||
title: '我的订阅',
|
title: '我的订阅',
|
||||||
tab: 'mysub',
|
tab: 'mysub',
|
||||||
icon: 'mdi-movie-open-outline',
|
icon: 'mdi-heart',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '热门订阅',
|
title: '热门订阅',
|
||||||
tab: 'popular',
|
tab: 'popular',
|
||||||
icon: 'mdi-movie-open-outline',
|
icon: 'mdi-fire',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -183,17 +191,17 @@ export const SubscribeTvTabs = [
|
|||||||
{
|
{
|
||||||
title: '我的订阅',
|
title: '我的订阅',
|
||||||
tab: 'mysub',
|
tab: 'mysub',
|
||||||
icon: 'mdi-television',
|
icon: 'mdi-heart',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '热门订阅',
|
title: '热门订阅',
|
||||||
tab: 'popular',
|
tab: 'popular',
|
||||||
icon: 'mdi-television',
|
icon: 'mdi-fire',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '订阅分享',
|
title: '订阅分享',
|
||||||
tab: 'share',
|
tab: 'share',
|
||||||
icon: 'mdi-television',
|
icon: 'mdi-share-variant',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -210,3 +218,22 @@ export const PluginTabs = [
|
|||||||
icon: 'mdi-store',
|
icon: 'mdi-store',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
// 发现标签页
|
||||||
|
export const DiscoverTabs = [
|
||||||
|
{
|
||||||
|
title: 'TheMovieDb',
|
||||||
|
tab: 'themoviedb',
|
||||||
|
icon: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '豆瓣',
|
||||||
|
tab: 'douban',
|
||||||
|
icon: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Bangumi',
|
||||||
|
tab: 'bangumi',
|
||||||
|
icon: '',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<script setup lang="ts"></script>
|
||||||
|
<template></template>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
|
||||||
|
</template>
|
||||||
@@ -397,9 +397,12 @@ onMounted(async () => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<VTabs v-model="activeTab">
|
<VTabs v-model="activeTab" show-arrows>
|
||||||
<VTab v-for="item in PluginTabs" :value="item.tab">
|
<VTab v-for="item in PluginTabs" :value="item.tab">
|
||||||
<span class="mx-5">{{ item.title }}</span>
|
<div class="flex align-center mx-5">
|
||||||
|
<VIcon size="20" start :icon="item.icon" />
|
||||||
|
{{ item.title }}
|
||||||
|
</div>
|
||||||
</VTab>
|
</VTab>
|
||||||
</VTabs>
|
</VTabs>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user