uniapp的uni.request请求接口如果发送formdata格式数据
uni.request({
url:baseconfig.baseUrl+'api/jwt/login',
method:'POST',
data:data, //此时的data传正常json形式就好
header:{
"Content-Type" : "application/x-www-form-urlencoded" //此处是关键
},
success: res => {},
fail() {}
})
评论