47001
发布于 5 年前 作者 zhangfang 6849 次浏览 来自 问答

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)

}

})

    一直返回errcode47001errmsg“data format error hint: [CdZf4a09431518]”

2 回复

你好,

出于安全考虑,是不允许把给小程序后台调用的接口放在前端调用的

好的,谢谢

回到顶部