wx.request({
url: 'https://api.weixin.qq.com/wxa/getwxacode?access_token=' + access_token,
method: 'POST',
header: {
'content-type': 'application/json;application/x-www-form-urlencoded;charset=utf-8',
},
data: {
"path": "pages/index2?id=123",
"width": 430
},
success: function (res) {
console.log('二维码成功', res)
},
fail: function (res) {
console.log('二维码失败', res)
}
})
一直返回errcode: 47001, errmsg: "data format error hint: [CdZf4a09431518]"
好的,谢谢
你好,
出于安全考虑,是不允许把给小程序后台调用的接口放在前端调用的