wx.request post过去的数据 出现object
发布于 5 年前 作者 xiadai 13648 次浏览 来自 问答

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 回复

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

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

怎么办

回到顶部