微信打开相册后显示图片

creator 微信打开相册并显示,图片选择后路径打印
http://tmp/wx021d5723a31b0141.o6zAJsxHnEb2hLCVNxWj53eziz7k.X6lVNRP4oReK64a424463e9ce44a450bfe64894626a9.jpg
我尝试着显示出来
wx.chooseImage({
count: 1,
sizeType: [‘original’, ‘compressed’],
sourceType: [‘album’, ‘camera’],
success (res) {
const tempFilePaths = res.tempFilePaths
console.log(“path:”+tempFilePaths);//图片路径打印
cc.loader.load(tempFilePaths, function (err, tex) {
if (tex && tex.height != 0) {
let spriteFrame = new cc.SpriteFrame(tex);
let Background = cc.find(“Canvas/OpenPhoto_Image/Background”);
Background.spriteFrame=new cc.SpriteFrame(tex);
} else {
console.log(“error:Invalid image!”);
}
});
}
})
},
没有显示出来,也没有打印错误。

我试试着把tex打印出来
console.log(“tex:”+tex.constructor.name);
结果打印出来的是:
tex:LoadingItems
开发卡住了,有没有人帮忙指引一下方向?

这么基础的问题,官方给个标准答复啊,查了论坛所有相关的帖子,最后还是没有答案。

这个是个数组,所以load返回的不是一个纹理,而是多个纹理, 自己调试看下 LoadingItems.completed 对象