小程序踩坑异步请求json时,headers设置 "content-type": "application/x-www-form-urlencoded"

wx.request({
url: url,
method:params.method,
data: params.data,
header: {
"content-type": "application/x-www-form-urlencoded"
},
success: function (res) {
console.log(res.data);
params.sCallback && params.sCallback(res.data)
},
fail:function(err){
this._processError(err);
}
})
原文地址:https://www.cnblogs.com/caicaizi/p/8533133.html