Merge pull request #1269 from nitezs/dev

修复 Artalk 无法获取最新评论的 bug
pull/1309/head
Jerry Wong 1 year ago committed by GitHub
commit 52441b6bf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -48,12 +48,18 @@ script.
const headerList = {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Origin': window.location.origin
}
},
body: new URLSearchParams({
'site_name': '!{site}',
'limit': '!{theme.newest_comments.limit}',
'type':'latest_comments'
})
}
const getComment = () => {
fetch('!{server}/api/stat?type=latest_comments&limit=!{theme.newest_comments.limit}&site_name=!{site}', headerList)
fetch('!{server}/api/stat', headerList)
.then(response => response.json())
.then(d => {
const artalk = d.data.map(function (e) {

Loading…
Cancel
Save