getImg() {this.imageReady(imgArr).then(() => {//do something})
}
imageReady(pics) {const picsAll = pics.map(imgurl => new Promise((resolve, reject) => {// 小程序判断多张图片是否加载完成方法wx.getImageInfo({src: imgurl,success: function() {resolve(imgurl);},fail: function() {reject(new Error('image load error'));}});// H5 判断图片是否加载完成方法// const img = new Image();// img.src = imgurl;// img.onload = () => resolve(imgurl);// img.onerror = () => reject(new Error('image load error'));}));return Promise.all(picsAll).then(() => {}).catch((e) => {});
},