I also encountered the problem of cross-domain image in the process of using, and began to use proxy server to solve it, but the feeling was not good. Then occasionally, I changed several small codes in html2Canvas source code and finally solved the problem.function ImageContainer(src, cors) {
    this.src = src;
    this.image = new Image();
    var self = this;
    this.tainted = null;
    this.promise = new Promise(function(resolve, reject) {
        self.image.onload = resolve;
        self.image.onerror = reject;
        if (cors) {
            //self.image.crossOrigin = "anonymous"; //1. Delete the anonymous code here and change to empty self.image.crossorigin =""; } //self.image.src = src; //2. Add a random number such as timestamp + after source SRC"?"+new Date().getTime();
        self.image.src = src+"?"+new Date().getTime();
        if (self.image.complete === true) { resolve(self.image); }}); } html2canvas($() {html2canvas($() {html2canvas($() {html2canvas($()}}"body"),{onrendered:function(canvas){
		//
},useCORS:true}); // Just set the useCORS totrue, never add allowTaint:trueThese two do not add at the same time, WHEN I was looking at the official website document, I saw that these two parameters are to solve the cross-domain, later added to the two, found two plus there will be a problem, you can view the source code, here I will not do too much explanationCopy the code