POST发送以下的数据:
{user_id:122,need_data: [{ "describe":"测试","img":"2017-09-28/59cccd5e7ef567.52312577.jpg,"} ]};经过测试.'application/json',不生效, 只有'application/x-www-form-urlencoded'生效,
而后台只能收到
{ user_id:122, need_data:[ Obejct Object ] }是我header不正确, 还是小程序POST根本不支持多级JSON 数据交互????
wx.request({ url:config.c.BuywouldLike, method:"POST", header: {"content-type":"application/x-www-form-urlencoded"}, data:{ user_id:122, need_data;[ { "describe":"测试" , "img":"2017-09-28/59cccd5e7ef567.52312577.jpg," } ] }, dataType:"JSON"});发到后台后,need_data是字符串"[ Object Object ] "
相似问题