var image
= wx
.createImage();
const screenWidth
= window
.innerWidth
const screenHeight
= window
.innerHeight
image
.src
= "resource/图片名称.jpg";
image
.onload = function () {
var context
= canvas
.getContext('2d');
context
.drawImage(image
, 0, 0, screenWidth
, screenHeight
);
}
转载请注明原文地址:https://tech.qufami.com/read-780.html