From fd8baaf9f28193c3c7ea5c5503605e2d785d1a90 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 30 Jul 2023 09:13:59 +0800 Subject: [PATCH] fix ui --- src/api/types.ts | 36 ++++++++++++++++++---- src/components/cards/PersonCard.vue | 4 +++ src/pages/browse.vue | 42 ++++++-------------------- src/pages/ranking.vue | 16 +++++----- src/styles/styles.scss | 11 +++++++ src/views/discover/MediaDetailView.vue | 16 +++++++++- 6 files changed, 77 insertions(+), 48 deletions(-) diff --git a/src/api/types.ts b/src/api/types.ts index c7c149e1..f4c9499e 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -279,22 +279,46 @@ export interface TmdbEpisode { // TMDB人特信息 export interface TmdbPerson { // ID - id: number + id?: number // 名称 - name: string + name?: string // 角色 - character: string + character?: string // 图片 - profile_path: string + profile_path?: string // 性别 - gender: number + gender?: number // 原名 - original_name: string + original_name?: string + + // 演员ID + credit_id?: string + + // 别名 + also_known_as?: string[] + + // 生日 + birthday?: string + + // 卒日 + deathday?: string + + // IMDB ID + imdb_id?: string + + // 部门 + known_for_department?: string + + // 出生地 + place_of_birth?: string + + // 热度 + popularity?: number } // 站点 diff --git a/src/components/cards/PersonCard.vue b/src/components/cards/PersonCard.vue index 5b5290a5..618c12bf 100644 --- a/src/components/cards/PersonCard.vue +++ b/src/components/cards/PersonCard.vue @@ -63,4 +63,8 @@ function getPersonImage() { .person-card { background-image: linear-gradient(45deg, #99999b, #384359 60%); } + +.person-card:hover { + background-image: linear-gradient(45deg, #bbbbbd, #8597aa 60%); +} diff --git a/src/pages/browse.vue b/src/pages/browse.vue index 7c84145b..48bccc45 100644 --- a/src/pages/browse.vue +++ b/src/pages/browse.vue @@ -10,25 +10,8 @@ const props = defineProps({ // 路由参数 const route = useRoute() -// 面包屑标题定义 -const titles: { [key: string]: any } = { - tmdb: { - trending: '流行趋势', - movies: '热门电影', - tvs: '热门电视剧', - }, - douban: { - movies: '最新电影', - tvs: '最新电视剧', - tv_weekly_chinese: '华语剧集榜', - tv_weekly_global: '全球剧集榜', - movie_top250: '电影TOP250', - }, - credits: '演员阵容', - media: { - search: '搜索', - }, -} +// 标题 +const title = route.query?.title?.toString() // 计算API路径 function getApiPath(paths: string[] | string) { @@ -37,24 +20,17 @@ function getApiPath(paths: string[] | string) { else return paths } - -// 面包屑标题 -function getTitle(paths: string[] | string, title: any = '') { - if (Array.isArray(paths)) { - if (title) - return [titles[paths[0]][paths[1]], title] - - return ['推荐', titles[paths[0]][paths[1]]] - } - else { - return ['发现'] - } -}