uni-app中请求post接口必须在header加上 header: { 'content-type': 'application/x-www-form-urlencoded', },
uni.request({
url: '请求接口地址',
method: 'POST', // 请求类型
header: { 'content-type': 'application/x-www-form-urlencoded', },
data: {
text : '传给后台的数据'
},
success:(res) => {
console.log(res,'成功后的返回')
}
})