diff --git a/src/components/VideoCard/VideoCard.vue b/src/components/VideoCard/VideoCard.vue index 0d499334..2e6bac9c 100644 --- a/src/components/VideoCard/VideoCard.vue +++ b/src/components/VideoCard/VideoCard.vue @@ -10,20 +10,21 @@ import { // import { LanguageType } from '~/enums/appEnums' const props = defineProps<{ - videoData: Video - // duration: number - // title: string - // cover: string - // author: string - // mid: number - // view: number - // danmaku: number - // publishedDate: number - + duration: number + title: string + cover: string + author: string + authorFace: string + mid: number + view: number + danmaku: number + publishedTimestamp: number + bvid?: string + aid?: number }>() const videoUrl = computed(() => { - return `https://www.bilibili.com/video/${props.videoData.bvid}` + return `https://www.bilibili.com/video/${props.bvid ?? `av${props.aid}`}` }) const isDislike = ref(false) @@ -157,7 +158,7 @@ function gotoChannel(mid: number) { text="!white xs" bg="black opacity-60" > - {{ calcCurrentTime(videoData.duration) }} + {{ calcCurrentTime(duration) }}
- - {{ videoData.title }} + + {{ title }} {{ - $t('common.view', { count: numFormatter(videoData.stat.view) }) + $t('common.view', { count: numFormatter(view) }) }} - {{ $t('common.danmaku', { count: numFormatter(videoData.stat.danmaku) }) }} + {{ $t('common.danmaku', { count: numFormatter(danmaku) }) }}
- {{ calcTimeSince(videoData.pubdate * 1000) }} + {{ calcTimeSince(publishedTimestamp * 1000) }}
diff --git a/src/contentScripts/views/Home/components/RecommendContent.vue b/src/contentScripts/views/Home/components/RecommendContent.vue index f2923b44..8c9b2f09 100644 --- a/src/contentScripts/views/Home/components/RecommendContent.vue +++ b/src/contentScripts/views/Home/components/RecommendContent.vue @@ -86,7 +86,16 @@ function jumpToLoginPage() {