mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-12 14:07:06 +08:00
Update artalk.pug
This commit is contained in:
@@ -48,21 +48,18 @@ script.
|
|||||||
const headerList = {
|
const headerList = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
'Origin': window.location.origin
|
'Origin': window.location.origin
|
||||||
}
|
},
|
||||||
|
body: new URLSearchParams({
|
||||||
|
'site_name': '!{site}',
|
||||||
|
'limit': '!{theme.newest_comments.limit}',
|
||||||
|
'type':'latest_comments'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const getComment = () => {
|
const getComment = () => {
|
||||||
fetch('!{server}/api/stat', Object.assign({
|
fetch('!{server}/api/stat', headerList)
|
||||||
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(response => response.json())
|
||||||
.then(d => {
|
.then(d => {
|
||||||
const artalk = d.data.map(function (e) {
|
const artalk = d.data.map(function (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user