axios使用

axios({
method:"POST",
// url:configure.state.gateway,
url:'/api',
// headers: {
// "Content-Type": "multipart/form-data",
// 'Content-Type': 'application/json;charset=utf-8',
// 'Access-Control-Allow-Origin': '*',
// },
withCredentials:true,
data:{
action:configure.state.site_digitalcert + 'certstatic/getZszmStatisticsByMuchTime',
method: "post",
site: configure.state.eureka_digitalcert,
timeout: 6000000,
params: JSON.stringify({start: "2019-1-1,2020-1-1", end: "2019-12-31,2020-12-31", czrlx: ""}),
},
}).then((res)=>{
console.log(res);
});

官方文档https://www.kancloud.cn/yunye/axios/234845
posted @ 2020-07-06 15:15  覃上  阅读(167)  评论(0编辑  收藏  举报