master
pipi 4 years ago
parent e43c76df15
commit 7928916143

@ -83,19 +83,21 @@
});
uni.request({
url: this.baseUrl + '/api/member/get-wxa-qrcode',
method: 'POST',
method: 'GET',
data: {
path: '',
scene: this.user_info.id
},
success: r => {
if (r.data.status === 1) {
let img_qr = r.data.data //
uni.getImageInfo({
src: this.baseUrl + r.data.data, //
success: res => {
let ctx = uni.createCanvasContext('firstCanvas')
// ctx.fillStyle = '#fff';
// ctx.fillRect(0, 0, 214, 342);
ctx.drawImage('../../static/bg_haibao@2x.png', 0, 0, 220, 220);
ctx.drawImage(img_qr, 43, 43, 128, 128);
ctx.drawImage(res.path, 43, 43, 128, 128);
ctx.draw()
setTimeout(()=>{
uni.canvasToTempFilePath({
@ -108,6 +110,8 @@
},
})
},100)
}
})
} else {
this.alert(r.data.msg)
}

Loading…
Cancel
Save