POST取数据问题
发布于 6 年前 作者 chaoxue 13894 次浏览 来自 问答

wx.request({

url: ‘user/thirdparty/login’, //仅为示例,并非真实的接口地址

method: ‘POST’,

data: {

‘openid’: ‘1’,

‘thirdPartyType’: ‘1’

},

header: {

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

},

success: function (res) {

console.log(res.data)

that.setData({

//array: res.data.data

})

}

})

{success: false, code: “FAILURE”, message: “Content type ‘application/x-www-form-urlencoded;charset=UTF-8’ not supported”, data: null}

一直取不到数据,请教怎么才能POST取到数据

回到顶部