/**     * 生成指定页面小程序二维码(小程序专属码)     */    qrcodeFn();    function qrcodeFn() {      wx.request({        url: 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=小程序id&secret=小程序密钥',        complete: function(tokenRes) {          wx.request({            url: 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=' + tokenRes.data.access_token,            method: 'POST',            data: {              scene: 1012,              // 是否为Png,默认jpeg              is_hyaline: true,              // 是否自动取色              auto_color:true,              page: 'pages/other/website/index',            },            responseType: 'arraybuffer',            complete: function(res) {            // 自动复制到剪切板              wx.setClipboardData({                data: wx.arrayBufferToBase64(res.data),                success(res) {}              })              console.log(wx.arrayBufferToBase64(res.data));            },          })        },      });    }

复制的base64 数据,可在小程序image标签src属性里显示,也可以在这里转换为图片
http://qinhaolei.gitee.io/base64_convert_picture/

TAG标签: 微信小程序公司二维码怎么申请

http://www.xiaochengxub.com/read-104634.html