post请求:
axios.post(
"url",
//传递的参数
{
"id":id
}
//传递的头部信息
{
headers:{'token':token}
}
)
get请求:
axios.get(
"url",
{
//参数列表
params:{"id":id},
//请求头配置
headers:{"Authorization":token}
}
)