mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
修复 Artalk 无法获取最新评论的 bug
This commit is contained in:
@@ -53,7 +53,16 @@ script.
|
||||
}
|
||||
|
||||
const getComment = () => {
|
||||
fetch('!{server}/api/stat?type=latest_comments&limit=!{theme.newest_comments.limit}&site_name=!{site}', headerList)
|
||||
fetch('!{server}/api/stat', Object.assign({
|
||||
headers:{
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
body: new URLSearchParams({
|
||||
'site_name': '!{site}',
|
||||
'limit': '!{theme.newest_comments.limit}',
|
||||
'type':'latest_comments'
|
||||
})
|
||||
}, headerList))
|
||||
.then(response => response.json())
|
||||
.then(d => {
|
||||
const artalk = d.data.map(function (e) {
|
||||
|
||||
Reference in New Issue
Block a user