diff --git a/src/api/types.ts b/src/api/types.ts index b4244512..eac29aa0 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -337,7 +337,7 @@ export interface TmdbEpisode { guest_stars: Object[] } -// TMDB人特信息 +// TMDB人物信息 export interface TmdbPerson { // ID id?: number @@ -388,6 +388,34 @@ export interface TmdbPerson { biography?: string } +// 豆瓣人物信息 +export interface DoubanPerson { + // ID + id?: string + + // 名称 + name?: string + + // 角色 + roles?: string[] + + // 简介 + title?: string + + // 详情页面 + url?: string + + // 饰演 + character?: string + + // 图片 large/normal + avatar?: { [key: string]: string } + + // 别名 + latin_name?: string + +} + // 站点 export interface Site { diff --git a/src/components/cards/DoubanPersonCard.vue b/src/components/cards/DoubanPersonCard.vue new file mode 100644 index 00000000..fcb1ba89 --- /dev/null +++ b/src/components/cards/DoubanPersonCard.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/src/components/cards/PersonCard.vue b/src/components/cards/TmdbPersonCard.vue similarity index 100% rename from src/components/cards/PersonCard.vue rename to src/components/cards/TmdbPersonCard.vue diff --git a/src/pages/credits.vue b/src/pages/credits.vue index 9c57b733..7a7aac5e 100644 --- a/src/pages/credits.vue +++ b/src/pages/credits.vue @@ -13,6 +13,9 @@ const route = useRoute() // 标题 const title = route.query?.title?.toString() +// 类型 +const type = route.query?.type?.toString() + // 计算API路径 function getApiPath(paths: string[] | string) { if (Array.isArray(paths)) @@ -34,6 +37,7 @@ function getApiPath(paths: string[] | string) { diff --git a/src/views/discover/MediaDetailView.vue b/src/views/discover/MediaDetailView.vue index d9ec0dff..c10cf2b9 100644 --- a/src/views/discover/MediaDetailView.vue +++ b/src/views/discover/MediaDetailView.vue @@ -109,7 +109,7 @@ async function checkMovieExists() { // 查询当前媒体是否已订阅 async function checkSubscribe(season = 0) { try { - const mediaid = `tmdb:${mediaDetail.value.tmdb_id}` + const mediaid = mediaDetail.value.tmdb_id ? `tmdb:${mediaDetail.value.tmdb_id}` : `douban:${mediaDetail.value.douban_id}` const result: Subscribe = await api.get(`subscribe/media/${mediaid}`, { params: { @@ -420,9 +420,9 @@ onBeforeMount(() => { />
-