From afd0b1125ddc2930ab526b51fc38832369abafb1 Mon Sep 17 00:00:00 2001 From: satori Date: Tue, 24 Dec 2024 17:07:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20int=20id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 34acdfc..810e137 100644 --- a/main.js +++ b/main.js @@ -30,7 +30,7 @@ const 综合 = new 类型() export function get_views(name, ids = []) { const all = { 文章, 作品, 游戏, 截图, 收藏, 综合 } const counts = all[name].浏览数.总 - return ids.map(id => ({ id, count: counts.get(id) || 0 })) + return ids.map(id => ({ id: parseInt(id, 10), count: counts.get(id) || 0 })) } // 获取当日热门搜索词