更新浏览和发现页面,重构相关组件,调整路由和菜单项

This commit is contained in:
jxxghp
2025-01-27 18:05:02 +08:00
parent dc8f7caab0
commit 966bb769df
6 changed files with 53 additions and 26 deletions

View File

@@ -1,5 +1,4 @@
<script setup lang="ts">
import api from '@/api'
import MediaCardListView from '@/views/discover/MediaCardListView.vue'
import PersonCardListView from '@/views/discover/PersonCardListView.vue'

View File

@@ -17,16 +17,6 @@ const viewList = reactive<{ apipath: string; linkurl: string; title: string }[]>
linkurl: '/browse/bangumi/calendar?title=Bangumi每日放送',
title: 'Bangumi每日放送',
},
{
apipath: 'tmdb/movies',
linkurl: '/browse/tmdb/movies?title=TMDB热门电影',
title: 'TMDB热门电影',
},
{
apipath: 'tmdb/tvs?with_original_language=zh|en|ja|ko',
linkurl: '/browse/tmdb/tvs??with_original_language=zh|en|ja|ko&title=TMDB热门电视剧',
title: 'TMDB热门电视剧',
},
{
apipath: 'douban/movie_hot',
linkurl: '/browse/douban/movie_hot?title=豆瓣热门电影',
@@ -42,16 +32,6 @@ const viewList = reactive<{ apipath: string; linkurl: string; title: string }[]>
linkurl: '/browse/douban/tv_animation?title=豆瓣热门动漫',
title: '豆瓣热门动漫',
},
{
apipath: 'douban/movies',
linkurl: '/browse/douban/movies?title=豆瓣最新电影',
title: '豆瓣最新电影',
},
{
apipath: 'douban/tvs',
linkurl: '/browse/douban/tvs?title=豆瓣最新电视剧',
title: '豆瓣最新电视剧',
},
{
apipath: 'douban/movie_top250',
linkurl: '/browse/douban/movie_top250?title=电影TOP250',

View File

@@ -25,7 +25,7 @@ export const SystemNavMenus = [
footer: false,
},
{
title: '资源搜索',
title: '搜索结果',
icon: 'mdi-magnify',
to: '/resource',
header: '发现',

View File

@@ -1,2 +1,20 @@
<script setup lang="ts"></script>
<template></template>
<script setup lang="ts">
import MediaCardListView from '@/views/discover/MediaCardListView.vue'
// 电影或者电视剧 movies/tvs
const type = ref('movies')
// 过滤参数
const filterParams = ref({
'type': 2,
'cat': null,
'sort': 'rank', // date/rank
'year': null,
})
</script>
<template>
<div>
<MediaCardListView apipath="bangumi/subjects" :params="filterParams" />
</div>
</template>

View File

@@ -1,6 +1,18 @@
<script setup lang="ts">
import MediaCardListView from '@/views/discover/MediaCardListView.vue'
// 电影或者电视剧 movies/tvs
const type = ref('movies')
// 过滤参数
const filterParams = ref({
'sort': 'R',
'tags': '',
})
</script>
<template>
<div>
<MediaCardListView :apipath="`douban/${type}`" :params="filterParams" />
</div>
</template>

View File

@@ -1,6 +1,24 @@
<script setup lang="ts">
import MediaCardListView from '@/views/discover/MediaCardListView.vue'
// 电影或者电视剧 movies/tvs
const type = ref('movies')
// 过滤参数
const filterParams = ref({
'sort_by': 'popularity.desc',
'with_genres': '',
'with_original_language': '',
'with_keywords': '',
'with_watch_providers': '',
'vote_average.gte': 0,
'vote_count.gte': 0,
'release_date.gte': '',
})
</script>
<template>
<div>
<MediaCardListView :apipath="`tmdb/${type}`" :params="filterParams" />
</div>
</template>