mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
commit
52441b6bf5
@ -48,12 +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?type=latest_comments&limit=!{theme.newest_comments.limit}&site_name=!{site}', headerList)
|
fetch('!{server}/api/stat', 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) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user