显示字段:
@@ -201,7 +217,7 @@
function getData() {
var xhr = new XMLHttpRequest();
- xhr.open("GET", "../data/weibo-hotband/latest.json?t=" + Date.now(), true);
+ xhr.open("GET", "../data/bilibili-rank/latest.json?t=" + Date.now(), true);
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) return;
@@ -218,6 +234,9 @@
}
console.log(hotBandData);
+ // 更新动态 note
+ document.getElementById("dynamic-note").innerHTML = hotBandData.note;
+
// 更新时间
document.getElementById("latestUpdateTime").innerHTML =
"数据拉取时间:" + new Date().toLocaleString() + "
" +
@@ -243,15 +262,37 @@
// 渲染表格
str.push(`
+
编号 |
- 热搜 |
- ${showEmoticon.checked ? "表情 | " : ""}
- ${showNum.checked ? '热度 (展示/真实) | ' : ""}
- ${showCategory.checked ? "分类 | " : ""}
- ${showOnboardTime.checked ? "上线时间 | " : ""}
- ${showIsNew.checked ? "是否新热搜 | " : ""}
- ${showDetail.checked ? "热搜详情 | " : ""}
- ${showMid.checked ? "mid | " : ""}
+ aid |
+ videos |
+ tid |
+ tname |
+ copyright |
+ pic |
+ title |
+ pubdate |
+ ctime |
+ desc |
+ state |
+ duration |
+ mission_id |
+ rights |
+ owner |
+ stat |
+ dynamic |
+ cid |
+ dimension |
+ short_link |
+ short_link_v2 |
+ first_frame |
+ pub_location |
+ bvid |
+ score |
+
+ season_id |
+ up_from_v2 |
+ others |
`);
str.push(`
`);
@@ -261,60 +302,63 @@
str.push(`
${i + 1} |
+
+ ${hotBand.aid} |
+
+ ${hotBand.videos} |
+
+ ${hotBand.tid} |
+
+ ${hotBand.tname} |
+
+ ${hotBand.copyright} |
+
+ ${hotBand.pic} |
+
+ ${hotBand.title} |
+
+ ${hotBand.pubdate} |
+
+ ${hotBand.ctime} |
+
+ ${hotBand.desc} |
+
+ ${hotBand.state} |
+
+ ${hotBand.duration} |
+
+ ${hotBand.mission_id} |
+
+ ${JSON.stringify(hotBand.rights)} |
+
+ ${JSON.stringify(hotBand.owner)} |
+
+ ${JSON.stringify(hotBand.stat)} |
+
+ ${hotBand.dynamic} |
+
+ ${hotBand.cid} |
+
+ ${JSON.stringify(hotBand.dimension)} |
+
+ ${hotBand.short_link} |
+
+ ${hotBand.short_link_v2} |
+
+ ${hotBand.first_frame} |
+
+ ${hotBand.pub_location} |
+
+ ${hotBand.bvid} |
+
+ ${hotBand.score} |
-
-
-
-
- ${hotBand.label_name}
-
- ${hotBand.word}
-
- |
-
- ${showEmoticon.checked ? `
-
- ${hotBand.emoticon} |
- ` : ""}
-
- ${showNum.checked ? `
-
-
- ${hotDelta == 0 ? hotBand.num : `${hotBand.num} / ${hotBand.raw_hot}`}
-
-
- ${hotDelta != 0 ? `(官方调控 ${hotDelta > 0 ? "+" : ""}${hotDelta})` : ""}
-
-
- |
- ` : ""}
-
- ${showCategory.checked ? `
-
- ${hotBand.category.map((c) => `${c}`).join(';')} |
- ` : ""}
-
- ${showOnboardTime.checked ? `
-
- ${new Date(hotBand.onboard_time * 1000).toLocaleString()} |
- ` : ""}
-
- ${showIsNew.checked ? `
-
- ${hotBand.more.is_new == 1 ? "是" : ""} |
- ` : ""}
-
- ${showDetail.checked ? `
-
-
- ${hotBand.more.detail}
- |
- ` : ""}
-
- ${showMid.checked ? `
-
- ${hotBand.more.mid} |
- ` : ""}
+
+ ${hotBand.season_id} |
+
+ ${hotBand.up_from_v2} |
+
+ ${JSON.stringify(hotBand.others)} |
`);
}
str.push(``);
diff --git a/index.html b/index.html
index 579413b..6d7b335 100644
--- a/index.html
+++ b/index.html
@@ -5,7 +5,7 @@
-
微博热搜
+
热搜榜单