1.第一必须加上请求头
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
2.第二参数要加上JSON.stringify
return request('/rainxml/services/pageoffice/setDate',{
method:"POST",
body:JSON.stringify({username:"zhaohao"}),
headers: {
' Accept': 'application/json',
'Content-Type': 'application/json',
}});
网友评论