获取页面二维码的接口,怎么老是提示错误啊
代码:
wx.request({
url: 'https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=’+app.globalData.token,
data: {‘path’: “/pages/my/my?uid=1”,‘width’: 430},
header: {
‘content-type’: ‘application/json’
},
success: function(res) {
console.log(res.data)
},
fail:function(res) {
console.log(‘isFail’)
}
})
输出的结果是: {errcode: 44002, errmsg: “empty post data hint: [tB1Kha0354vr18]”}
说是post data 是空的,哪位高人能帮忙解决下,多谢了!!!
3 回复