From 486768fedf080627340ccd513cf461caf37792d7 Mon Sep 17 00:00:00 2001 From: DavidDengHui Date: Mon, 7 Oct 2024 14:06:23 +0800 Subject: [PATCH] Fix BILIBILI API. --- source/_data/widget.yml | 7 ++++--- source/css/mySwiper.css | 9 ++++++++- source/js/mySwiper.js | 3 ++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/source/_data/widget.yml b/source/_data/widget.yml index 358a4e1e..354360c9 100644 --- a/source/_data/widget.yml +++ b/source/_data/widget.yml @@ -38,13 +38,14 @@ home_widget: icon: fa-brands fa-bilibili fa-shake fa-xl icon_color: '#056DE8' url: https://www.bilibili.com/v/popular/rank/all - background: '#fff' + background: '#fff' html: '
- + - + +

TOP{{index+1}}    {{item.hot}}  diff --git a/source/css/mySwiper.css b/source/css/mySwiper.css index 3ad8e827..f2d7491f 100644 --- a/source/css/mySwiper.css +++ b/source/css/mySwiper.css @@ -28,9 +28,16 @@ } .myswiper .swiper-slide h2 { z-index: 9999; - color: #fff; + color: #222222; + font-size: 24px; +} + +.darkModel .myswiper .swiper-slide h2 { + z-index: 9999; + color: #c9d1d9; font-size: 24px; } + .myswiper .swiper-slide img { filter: brightness(0.7); /* 图片变暗 ,字体看得清 */ } diff --git a/source/js/mySwiper.js b/source/js/mySwiper.js index 708ec851..ae5f67f8 100644 --- a/source/js/mySwiper.js +++ b/source/js/mySwiper.js @@ -58,7 +58,7 @@ new Vue({ }, // 请求开源api getList() { - fetch("https://api.vvhan.com/api/hotlist?type=bili", { + fetch("https://api.vvhan.com/api/hotlist/bili", { // fetch("https://tenapi.cn/v2/weekly", { // fetch("https://api.bilibili.com/x/web-interface/popular?ps=20&pn=1", { // fetch("https://qqlykm.cn/api/hotlist/get?key=XWM0J8FEYVbwggCgV1PuJqLj5s&type=bilibili", { @@ -69,6 +69,7 @@ new Vue({ }) .then((data) => { this.listData = data.data; + console.log(this.listData); }) .catch((err) => { console.log("err", err);