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(() => {
/>
+
+
@@ -682,6 +722,13 @@ onBeforeMount(() => {
title="推荐"
/>
+
+
+
import api from '@/api'
-import type { TmdbPerson } from '@/api/types'
-import PersonCard from '@/components/cards/PersonCard.vue'
+import DoubanPersonCard from '@/components/cards/DoubanPersonCard.vue'
+import TmdbPersonCard from '@/components/cards/TmdbPersonCard.vue'
import NoDataFound from '@/components/NoDataFound.vue'
// 输入参数
const props = defineProps({
apipath: String,
params: Object as PropType<{ [key: string]: any }>,
+ type: String,
})
// 判断是否有滚动条
@@ -29,8 +30,8 @@ const loading = ref(false)
const isRefreshed = ref(false)
// 数据列表
-const dataList = ref([])
-const currData = ref([])
+const dataList = ref([])
+const currData = ref([])
// 获取列表数据
async function fetchData({ done }: { done: any }) {
@@ -135,11 +136,22 @@ async function fetchData({ done }: { done: any }) {
>
+