小程序getUnlimitedQRCode接口调用为何返回的是乱码?是我哪里写不对码?
我打开network里可以正常看到二维码图片了,可是我怎么转成图片让前台显示呢?
bb15() {
console.log('开始提交数据')
console.log('arr4', this.arr4)
uni.request({
url: 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=' + this.aid +
'&secret=' + this.bid,
method: 'GET', //接收请求的方式,如果不传默认为POST
header: {
'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
},
success: (res) => {
this.access_token = res.data.access_token
console.log('token', res)
}
})
uni.request({
url: 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=' + this.access_token,
method: 'POST', //接收请求的方式,如果不传默认为POST
data: {
"page": "pages/index/index",
"scene": "a=1",
"check_path": true,
"env_version": "release"
},
success: (res) => {
this.temptp = res.data
console.log('二维码回传信息', res)
}
})
},