|
|
@ -47,11 +47,11 @@ export function postRequest(url: string, data: object) {
|
|
|
|
body: JSON.stringify(data),
|
|
|
|
body: JSON.stringify(data),
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then(response => {
|
|
|
|
.then(response => {
|
|
|
|
message.info('response',response)
|
|
|
|
message.info('response',url,response)
|
|
|
|
if (!response.ok) { throw new Error('请求失败'); }
|
|
|
|
if (!response.ok) { throw new Error('请求失败'); }
|
|
|
|
return response.json();
|
|
|
|
return response.json();
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(error => console.error(error));
|
|
|
|
.catch(error => {console.error(error), message.info('responerrorse',url,error)});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|