注意看传参类型是什么,这里是text类型
默认的是json类型
所以当后台接受参数类型为字符时记得在header中改content-type
...
method: 'post',
header:{
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
},
data:{},
...
注意看传参类型是什么,这里是text类型
默认的是json类型
所以当后台接受参数类型为字符时记得在header中改content-type
...
method: 'post',
header:{
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
},
data:{},
...