diff --git a/src/api/types.ts b/src/api/types.ts index 2cd0e053..912d431d 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -213,8 +213,8 @@ export interface MediaInfo { number_of_seasons?: number origin_countryv: string[] original_name?: string - production_companies?: string[] - production_countries?: string[] + production_companies?: any[] + production_countries?: any[] spoken_languages?: string[] status?: string tagline?: string diff --git a/src/views/discover/MediaDetailView.vue b/src/views/discover/MediaDetailView.vue index 7507c011..affd0192 100644 --- a/src/views/discover/MediaDetailView.vue +++ b/src/views/discover/MediaDetailView.vue @@ -107,6 +107,16 @@ function getTvdbLink() { return `https://www.thetvdb.com/series/${mediaDetail.value.tvdb_id}` } +// 获取发行国家名称 +const getProductionCountries = computed(() => { + return mediaDetail.value.production_companies?.map(country => country.name) +}) + +// 获取发行公司名称 +const getProductionCompanies = computed(() => { + return mediaDetail.value.production_companies?.map(company => company.name) +}) + onBeforeMount(() => { getMediaDetail() }) @@ -196,7 +206,55 @@ onBeforeMount(() => { -
+
+
+
+ +
+
+ 原始标题 + {{ mediaDetail.original_title || mediaDetail.original_name }} +
+
+ 状态 + {{ mediaDetail.status }} +
+
+ 上映日期 + + + + {{ mediaDetail.release_date || mediaDetail.first_air_date }} + + +
+
+ 原始语言 + {{ mediaDetail.original_language }} +
+
+ 出品国家 + + + {{ country }} + + +
+
+ 制作公司 + + {{ company }} + +
+
+
@@ -434,6 +492,41 @@ a.crew-name { } } +.media-facts { + border-radius: 0.5rem; + border-width: 1px; + --tw-border-opacity: 1; + border-color: rgb(55 65 81/var(--tw-border-opacity)); + --tw-bg-opacity: 1; + font-size: .875rem; + line-height: 1.25rem; + font-weight: 700; + --tw-text-opacity: 1; +} + +.media-ratings { + border-bottom-width: 1px; + --tw-border-opacity: 1; + border-color: rgb(55 65 81/var(--tw-border-opacity)); + padding: 0.5rem 1rem; + font-weight: 500; +} + +.media-ratings { + display: flex; + align-items: center; + justify-content: center; +} + +.media-fact { + display: flex; + justify-content: space-between; + border-bottom-width: 1px; + --tw-border-opacity: 1; + border-color: rgb(55 65 81/var(--tw-border-opacity)); + padding: 0.5rem 1rem; +} + .media-overview h2 { font-size: 1.25rem; line-height: 1.75rem;