获取当日热门搜索词
This commit is contained in:
6
main.js
6
main.js
@@ -37,8 +37,8 @@ export function get_views(name, ids = []) {
|
||||
export function get_search(n = 10) {
|
||||
const ex = new Map()
|
||||
const all = { 文章, 作品, 游戏, 截图, 收藏, 综合 }
|
||||
for (const item of all) {
|
||||
item.搜索词.forEach((value, key) => {
|
||||
for (const key in all) {
|
||||
all[key].搜索词.forEach((value, key) => {
|
||||
ex.set(key, (ex.get(key) || 0) + value)
|
||||
})
|
||||
}
|
||||
@@ -155,7 +155,7 @@ export function main() {
|
||||
文章.浏览数.周.set(id, (文章.浏览数.周.get(id) || 0) + 1)
|
||||
文章.浏览数.月.set(id, (文章.浏览数.月.get(id) || 0) + 1)
|
||||
文章.浏览数.年.set(id, (文章.浏览数.年.get(id) || 0) + 1)
|
||||
文章.浏览数.总.set(id, (文章.浏览数.总.get(id) || 0) + 1)
|
||||
文章.浏览数.总.set(id, (文章.浏览数.总.get(id) || 0) + 1)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user