This commit is contained in:
Jerry
2024-02-22 17:04:11 +08:00
parent 6ebe51e971
commit d9829167aa
11 changed files with 63 additions and 96 deletions

View File

@@ -8,19 +8,15 @@ script.
const keyArray = Array.from(eleGroup).map(i => i.getAttribute('data-page-key'))
const headerList = {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Origin': window.location.origin
},
body: new URLSearchParams({
'site_name': '!{site}',
'type':'page_comment',
'page_keys': keyArray
})
method: 'GET',
}
const res = await fetch('!{server}/api/stat', headerList)
const searchParams = new URLSearchParams({
'site_name': '!{site}',
'page_keys': keyArray
})
const res = await fetch(`!{server}/api/v2/stats/page_comment?${searchParams}`, headerList)
const result = await res.json()
keyArray.forEach((key, index) => {