|
|
@ -39,7 +39,7 @@ export function getRequest(url: string, params: object) {
|
|
|
|
* @returns {Promise} - 返回一个 Promise 对象,包含 response 数据或 error 信息
|
|
|
|
* @returns {Promise} - 返回一个 Promise 对象,包含 response 数据或 error 信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export function postRequest(url: string, data: object) {
|
|
|
|
export function postRequest(url: string, data: object) {
|
|
|
|
return fetch(url, {
|
|
|
|
return fetch('http://127.0.0.1:8088' + url, {
|
|
|
|
method: 'POST',
|
|
|
|
method: 'POST',
|
|
|
|
headers: {
|
|
|
|
headers: {
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|