wx.request post过去的数据 出现object

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

wx.request post过去的数据 出现object 拿不到原先对象里的数据?

wx.request({

url: https://sharkdemo.com/api/accompany/,

data: e[0],

header: {

‘content-type’: ‘application/x-www-form-urlencoded’

},

method: ‘POST’,

dataType: ‘json’,

success®{

console.log(r.data)

},

fail®{

console.log(‘error’)

}

})

post过去的数据

php后端:

返回的数据:

2 回复
qiangtan
qiangtan1 楼6 年前

JSON.stringify() 用这个处理一下数据试一下

jietao
jietao2 楼4 年前

post过去的data:{ 对象 { 就会出这问题 } }

怎么办