This commit is contained in:
杨志
2026-01-21 08:57:26 +08:00
parent 91460a7bdc
commit dd99d0b397
3 changed files with 55 additions and 30 deletions

View File

@@ -232,6 +232,7 @@
method: 'GET',
headers: {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
}
})
.then(response => response.json())
@@ -260,6 +261,7 @@
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Requested-With': 'XMLHttpRequest',
},
body: `base_url=${encodeURIComponent(baseUrl)}`
})
@@ -282,6 +284,7 @@
method: 'GET',
headers: {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest',
}
})
.then(response => response.json())
@@ -345,6 +348,7 @@
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Requested-With': 'XMLHttpRequest',
},
body: `username=${encodeURIComponent(username)}&password=${encodeURIComponent(password)}`
})
@@ -374,6 +378,7 @@
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Requested-With': 'XMLHttpRequest',
},
body: `username=${encodeURIComponent(username)}`
})