diff --git a/src/contentScripts/views/Anime/Anime.vue b/src/contentScripts/views/Anime/Anime.vue index 6b6dc10d..a7d65aff 100644 --- a/src/contentScripts/views/Anime/Anime.vue +++ b/src/contentScripts/views/Anime/Anime.vue @@ -8,6 +8,7 @@ const recommendAnimeList = reactive([]) const animeWatchList = reactive([]) const cursor = ref() const isLoading = ref() +const activatedSeasonId = ref() onMounted(() => { getRecommendAnimeList() @@ -45,12 +46,8 @@ function getAnimeWatchList() { code, data: { list }, } = response - if (code === 0) { - Object.assign( - animeWatchList, - list, - ) - } + if (code === 0) + Object.assign(animeWatchList, list) }) .finally(() => { isLoading.value = false @@ -70,15 +67,10 @@ function getRecommendAnimeList() { data: { items, coursor }, } = response if (code === 0) { - if (recommendAnimeList.length === 0) { - Object.assign( - recommendAnimeList, - items[0].sub_items as AnimeItem[], - ) - } - else { - recommendAnimeList.push(...items[0].sub_items) - } + if (recommendAnimeList.length === 0) + Object.assign(recommendAnimeList, items[0].sub_items as AnimeItem[]) + else recommendAnimeList.push(...items[0].sub_items) + cursor.value = coursor } }) @@ -94,16 +86,17 @@ function getRecommendAnimeList() { +

Your Watchlist

-
-
+
+
+
@@ -133,23 +129,98 @@ function getRecommendAnimeList() {

Recommended for you

- diff --git a/src/contentScripts/views/Anime/types.ts b/src/contentScripts/views/Anime/types.ts index 8aad4fd0..995cc44f 100644 --- a/src/contentScripts/views/Anime/types.ts +++ b/src/contentScripts/views/Anime/types.ts @@ -28,11 +28,12 @@ export interface PopularAnime { export interface AnimeItem { cover: string + horizontal_cover_16_9: string episode_id: number evaluate: string hover: { img: string - text: string[] + text: string[] // 番劇風格 } link: string url: string @@ -55,4 +56,7 @@ export interface AnimeItem { follow: number } progress: string + is_finish: 1 | 0 // 是否已經完結 + total_count: number // 當前集數 + styles: string[] // 番劇風格 }