request 400报错

发布于 7 年前作者 xgong3804 次浏览最后编辑 7 年前来自 ask

wx.request({

url: ‘http://’ + address + ‘order/getOrder.json’,

data: orderList,

method: ‘post’,

header: {

“Content-Type”: “application/x-www-form-urlencoded”

},

success:function(res){

console.log(res);

}

})

4 回复
wei94
wei941 楼6 年前

我传的是一个对象

yangyao
yangyao2 楼6 年前

通常400都是参数格式不对,你和后台接口对比看看对象的包装是否正确,是否需要JSON.stringify转字符串。

cguo
cguo3 楼6 年前

参数不对?

xiuyingyin
xiuyingyin4 楼5 年前

手动@官方