From d5648e7636d0568b96928a00c96b468235c0988c Mon Sep 17 00:00:00 2001 From: satori Date: Mon, 16 Dec 2024 06:31:10 +0800 Subject: [PATCH] DEBUG --- main.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index 805f2fc..8265235 100644 --- a/main.js +++ b/main.js @@ -71,9 +71,9 @@ export default function () { setInterval(() => { 存档('每10分钟自动存档...') - update('web_images', 'day_rank', Object.entries(Object.fromEntries(screenshots))) - update('web_article', 'day_rank', Object.entries(Object.fromEntries(articles))) - //update('web_member_explorer', 'day_rank', Object.entries(Object.fromEntries(collections))) + update('web_images', 'day_rank', Object.entries(Object.fromEntries(截图.浏览数.日))) + update('web_article', 'day_rank', Object.entries(Object.fromEntries(文章.浏览数.日))) + //update('web_member_explorer', 'day_rank', Object.entries(Object.fromEntries(收藏.浏览数.日))) }, 600000) // 实时读取日志文件 @@ -97,7 +97,7 @@ export default function () { if (item.request.uri.startsWith('/web/v1/article/get')) { const [uri, id] = item.request.uri.match(articleRegex) ?? [] if (uri && id) { - articles.set(id, articles.has(id) ? articles.get(id) + 1 : 1) + 文章.浏览数.日.set(id, 文章.浏览数.日.has(id) ? 文章.浏览数.日.get(id) + 1 : 1) } } @@ -105,7 +105,7 @@ export default function () { if (item.request.uri.startsWith('/web/v1/images/detail/v2')) { const [uri, id] = item.request.uri.match(imagesRegex) ?? [] if (uri && id) { - screenshots.set(id, screenshots.has(id) ? screenshots.get(id) + 1 : 1) + 截图.浏览数.日.set(id, 截图.浏览数.日.has(id) ? 截图.浏览数.日.get(id) + 1 : 1) } return } @@ -114,7 +114,7 @@ export default function () { if (item.request.uri.startsWith('/web/v1/member/explorer/article/get')) { const [uri, id] = item.request.uri.match(collectionRegex) ?? [] if (uri && id) { - collections.set(id, collections.has(id) ? collections.get(id) + 1 : 1) + 收藏.浏览数.日.set(id, 收藏.浏览数.日.has(id) ? 收藏.浏览数.日.get(id) + 1 : 1) } return }