在使用插件wxa-plugin-canvas生成图片时,有些图片元素是本地临时文件,生成时出现报错downloadFile:fail Error: getaddrinfo ENOTFOUND tmp"
通过修改文件目录 miniprogram_npm — wxa-plugin-canvas — index — index.js文件下的
_downImage方法
if (/^http/.test(imageUrl) && !/tmp/.test(imageUrl) && !new RegExp(wx.env.USER_DATA_PATH).test(imageUrl))