Commit dfb4b39a by 李嘉林

滚动加载图片错误替换

parent 73de9c7c
......@@ -121,6 +121,12 @@ const componentOptions = {
$themeToLink({ type: 1, link: `/merchantsDetail/${orgId}` });
},
errorFunction(e) {
this.setData({
"items.productImgUrl":"https://cdn.mayi888.com/product/85pdScJ5ch.jpg?x-oss-process=image/resize,m_pad,limit_0,w_400,h_400",
"items.coverImage":"https://cdn.mayi888.com/product/85pdScJ5ch.jpg?x-oss-process=image/resize,m_pad,limit_0,w_400,h_400",
})
},
},
// 组件生命周期
lifetimes: {
......
......@@ -70,6 +70,7 @@
lazy-load
mode="{{datas.componentData.style==='rowList' || datas.componentData.style==='heap'?'aspectFit':'widthFix'}}"
class="productImgUrl"
binderror="errorFunction"
wx:if="{{datas.componentData.goodsImgType == 1}}"
src="{{items.productImgUrl}}"
/>
......@@ -77,6 +78,7 @@
lazy-load
mode="{{datas.componentData.style==='rowList' || datas.componentData.style==='heap'?'aspectFit':'widthFix'}}"
class="productImgUrl"
binderror="errorFunction"
wx:else
src="{{items.coverImage}}"
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment