diff --git a/fetch_test.js b/fetch_test.js
index 3c2a78c..26f9ef1 100644
--- a/fetch_test.js
+++ b/fetch_test.js
@@ -176,46 +176,29 @@ const saveFile = `${new Date().getTime()}_zhihu_hot.json`;
await pushPlusNotify('知乎热榜更新失败', '请查看日志获取详细信息');
}
- function setDiv(item) {
- return `
-
-
热度:${item.popularity}
-
${item.title}
-
`;
+ function setDiv(item, index) {
+ return `${index + 1}. ${item.shortTitle}`;
}
- let content = zhihu_hot_list.reduce(
- (accumulator, currentValue) => accumulator + setDiv(currentValue),
- ''
- );
+ const content = zhihu_hot_list.map((item, index) => setDiv(item, index)).join('');
let html = `
-
-
-
-
- 展示 知乎 数据
-
-
- ${content}
-
-
-`;
+ `;
await pushPlusNotify('知乎热榜已更新', `${getcurrentDate()} 知乎热榜已更新` + html);
diff --git a/zhihu.html b/zhihu.html
index 17e7dc7..eec45b4 100644
--- a/zhihu.html
+++ b/zhihu.html
@@ -8,22 +8,69 @@
font-family: Arial, sans-serif;
margin: 20px;
}
- h2 {
+ ul {
+ list-style-type: none;
+ padding: 0;
+ font-size: 28px;
+ }
+ ul li {
+ margin: 10px 20px;
+ padding: 10px 20px;
+ }
+
+ a {
+ text-decoration: none;
color: #333;
}
- p {
- line-height: 1.6;
- }
- .popularity {
- color: #888;
- }
-
-
-
热度:${item.popularity}
-
${item.title}
-
+
+