DEBUG
This commit is contained in:
12
main.js
12
main.js
@@ -71,9 +71,9 @@ export default function () {
|
|||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
存档('每10分钟自动存档...')
|
存档('每10分钟自动存档...')
|
||||||
update('web_images', 'day_rank', Object.entries(Object.fromEntries(screenshots)))
|
update('web_images', 'day_rank', Object.entries(Object.fromEntries(截图.浏览数.日)))
|
||||||
update('web_article', 'day_rank', Object.entries(Object.fromEntries(articles)))
|
update('web_article', 'day_rank', Object.entries(Object.fromEntries(文章.浏览数.日)))
|
||||||
//update('web_member_explorer', 'day_rank', Object.entries(Object.fromEntries(collections)))
|
//update('web_member_explorer', 'day_rank', Object.entries(Object.fromEntries(收藏.浏览数.日)))
|
||||||
}, 600000)
|
}, 600000)
|
||||||
|
|
||||||
// 实时读取日志文件
|
// 实时读取日志文件
|
||||||
@@ -97,7 +97,7 @@ export default function () {
|
|||||||
if (item.request.uri.startsWith('/web/v1/article/get')) {
|
if (item.request.uri.startsWith('/web/v1/article/get')) {
|
||||||
const [uri, id] = item.request.uri.match(articleRegex) ?? []
|
const [uri, id] = item.request.uri.match(articleRegex) ?? []
|
||||||
if (uri && id) {
|
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')) {
|
if (item.request.uri.startsWith('/web/v1/images/detail/v2')) {
|
||||||
const [uri, id] = item.request.uri.match(imagesRegex) ?? []
|
const [uri, id] = item.request.uri.match(imagesRegex) ?? []
|
||||||
if (uri && id) {
|
if (uri && id) {
|
||||||
screenshots.set(id, screenshots.has(id) ? screenshots.get(id) + 1 : 1)
|
截图.浏览数.日.set(id, 截图.浏览数.日.has(id) ? 截图.浏览数.日.get(id) + 1 : 1)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -114,7 +114,7 @@ export default function () {
|
|||||||
if (item.request.uri.startsWith('/web/v1/member/explorer/article/get')) {
|
if (item.request.uri.startsWith('/web/v1/member/explorer/article/get')) {
|
||||||
const [uri, id] = item.request.uri.match(collectionRegex) ?? []
|
const [uri, id] = item.request.uri.match(collectionRegex) ?? []
|
||||||
if (uri && id) {
|
if (uri && id) {
|
||||||
collections.set(id, collections.has(id) ? collections.get(id) + 1 : 1)
|
收藏.浏览数.日.set(id, 收藏.浏览数.日.has(id) ? 收藏.浏览数.日.get(id) + 1 : 1)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user