axios.post请求模板
- axios.post请求模板
const result = axios.post(
`http://127.0.0.1:8080/Home/getData`,
{
"id": id,
"pageindex": page,
"pagesize": pageSize
},
{
headers: {
"Accept": "application/json",
}
}
).then((res) => {
console.log(res.data)
return res.data;
}).catch((error) => {
console.log(error);
});