解决方案:利用bindload判断图片加载完毕,修改状态显示图片
wxml:
<view wx:for="{{flash}}">
<image src="{{item.loadReady ? item.img : '默认图'}}" bindload="imageLoadReady" data-index="{{index}}" data-key="flash"></image>
</view>
js:
//图片加载
imageLoadReady(e){
let th = this;
let images = th.data[e.currentTarget.dataset.key];
images[e.currentTarget.dataset.index].loadReady = true;
th.setData({
[e.currentTarget.dataset.key]:images
})
}