- {{ channelName }}
+ {{ videoData.owner.name }}
- {{ numFormatter(viewCount)
+ {{ numFormatter(videoData.stat.view)
}}{{
language === LanguageType.English
- ? ` ${$t('common.view', viewCount)}`
- : $t('common.view', viewCount)
+ ? ` ${$t('common.view', videoData.stat.view)}`
+ : $t('common.view', videoData.stat.view)
}}
•
- {{ calcTimeSince(ctime * 1000)
+ {{ calcTimeSince(videoData.pubdate * 1000)
}}{{
language === LanguageType.English
? ` ${$t('common.ago')}`
diff --git a/src/components/VideoCard/types.ts b/src/components/VideoCard/types.ts
new file mode 100644
index 00000000..44233f11
--- /dev/null
+++ b/src/components/VideoCard/types.ts
@@ -0,0 +1,19 @@
+export interface Video {
+ id: number
+ bvid: string
+ owner: {
+ face: string
+ mid: number
+ name: string
+ }
+ pic: string
+ pubdate: number
+ stat: {
+ danmaku: number
+ like: number
+ view: number
+ }
+ title: string
+ uri: string
+ duration: number
+}
diff --git a/src/contentScripts/views/Home/RecommendContent.vue b/src/contentScripts/views/Home/RecommendContent.vue
index 9b75debe..b2b0a078 100644
--- a/src/contentScripts/views/Home/RecommendContent.vue
+++ b/src/contentScripts/views/Home/RecommendContent.vue
@@ -1,139 +1,75 @@
-
-
-