wx.request({
url: 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=',
data: {
scene: '000',
page: "pages/index/index" //这里按照需求设置值和参数
},
method: "POST",
responseType: 'arraybuffer', //设置响应类型
success(res) {
console.log(res)
var src2 = wx.arrayBufferToBase64(res.data); //对数据进行转换操作
console.log('src2', src2)
// that.setData({
// src2
// })
},
fail(e) {
console.log(e)
}
})
eyJlcnJjb2RlIjo0MDAwMSwiZXJybXNnIjoiaW52YWxpZCBjcmVkZW50aWFsLCBhY2Nlc3NfdG9rZW4gaXMgaW52YWxpZCBvciBub3QgbGF0ZXN0IHJpZDogNjI2N2UzMzItN2FmMTRkMDMtMzExOTI4ZjIifQ==
你这是 要抢后端同学饭碗啊
服务端调用,别前端