小程序码的生成错误
发布于 5 年前 作者 yang86 13199 次浏览 来自 问答

使用接口B生成小程序码出错,返回错误码41001,错误信息access_token missing hint: [t.wd30898e622],token都正常获取到并传入,帮忙看下是什么原因的,谢谢啦

代码:

        var token = res.data.access_token

        var page = ‘/pages/editPoster/preview/preview?posterID=’ + that.data.posterID

        //生成小程序码

        wx.request({

          url: ‘https://api.weixin.qq.com/wxa/getwxacodeunlimit’,

          method: ‘POST’,

          header: {

            ‘content-type’: ‘application/json’,

          },

          data: {

            scene: 2333,

            access_token: token,

            page: page,

            width: 430,

            auto_color: true,

            line_color: { “r”: “222”, “g”: “111”, “b”: “222” }

          },

          success: function (res) {

            console.log(res)

          },

          fail: function (res) {

          }

        })

回到顶部