master_basic
鲁誉程 1 year ago
parent 504e4f51cc
commit c251f909e5

@ -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)});
} }

Loading…
Cancel
Save