master_basic
鲁誉程 1 year ago
parent 0a384ec445
commit 504e4f51cc

@ -1,3 +1,5 @@
import { message } from "antd";
/** /**
* GET * GET
* @param {string} url - URL * @param {string} url - URL
@ -45,6 +47,7 @@ export function postRequest(url: string, data: object) {
body: JSON.stringify(data), body: JSON.stringify(data),
}) })
.then(response => { .then(response => {
message.info('response',response)
if (!response.ok) { throw new Error('请求失败'); } if (!response.ok) { throw new Error('请求失败'); }
return response.json(); return response.json();
}) })

Loading…
Cancel
Save