mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
Update artalk.pug
This commit is contained in:
parent
096973ecce
commit
0342df6ed7
@ -48,21 +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', 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))
|
||||
fetch('!{server}/api/stat', headerList)
|
||||
.then(response => response.json())
|
||||
.then(d => {
|
||||
const artalk = d.data.map(function (e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user