使用 int id

This commit is contained in:
2024-12-24 17:07:20 +08:00
parent b8e35a9760
commit afd0b1125d

View File

@@ -30,7 +30,7 @@ const 综合 = new 类型()
export function get_views(name, ids = []) { export function get_views(name, ids = []) {
const all = { 文章, 作品, 游戏, 截图, 收藏, 综合 } const all = { 文章, 作品, 游戏, 截图, 收藏, 综合 }
const counts = all[name].浏览数. 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 }))
} }
// 获取当日热门搜索词 // 获取当日热门搜索词