From 30a0bb6fb35a535602c5ce70655ac7fac5507dc4 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Sun, 5 Feb 2023 02:05:10 +0800 Subject: [PATCH] update: anime page --- src/background/apis/anime.ts | 3 +- src/components/HorizontalScrollView.vue | 8 -- src/contentScripts/views/Anime/Anime.vue | 119 ++++++++++++++++-- .../views/Anime/components/AnimeTimeTable.vue | 10 +- .../Anime/components/PopularAnimeCarousel.vue | 72 ++++++----- 5 files changed, 160 insertions(+), 52 deletions(-) diff --git a/src/background/apis/anime.ts b/src/background/apis/anime.ts index 0a5c601b..6460b60b 100644 --- a/src/background/apis/anime.ts +++ b/src/background/apis/anime.ts @@ -22,7 +22,7 @@ export const setupAnimeAPIs = () => { } else if (message.contentScriptQuery === 'getRecommendAnimeList') { const url = `https://api.bilibili.com/pgc/page/web/v3/feed?name=anime&coursor=${ - message.cursor ?? '' + message.coursor ?? '' }` return fetch(url) .then(response => response.json()) @@ -45,5 +45,6 @@ export const setupAnimeAPIs = () => { .then(data => data) .catch(error => console.error(error)) } + // TODO: https://api.bilibili.com/pgc/season/index/condition?season_type=1&type=1 }) } diff --git a/src/components/HorizontalScrollView.vue b/src/components/HorizontalScrollView.vue index 80b2fddc..06e287c4 100644 --- a/src/components/HorizontalScrollView.vue +++ b/src/components/HorizontalScrollView.vue @@ -1,19 +1,11 @@