Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
dfb4b39a
Commit
dfb4b39a
authored
Sep 15, 2022
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
滚动加载图片错误替换
parent
73de9c7c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
static/nativeComponents/GoodsList/GoodsItem/index.js
+6
-0
static/nativeComponents/GoodsList/GoodsItem/index.wxml
+2
-0
No files found.
static/nativeComponents/GoodsList/GoodsItem/index.js
View file @
dfb4b39a
...
@@ -121,6 +121,12 @@ const componentOptions = {
...
@@ -121,6 +121,12 @@ const componentOptions = {
$themeToLink
({
type
:
1
,
link
:
`/merchantsDetail/
${
orgId
}
`
});
$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
:
{
lifetimes
:
{
...
...
static/nativeComponents/GoodsList/GoodsItem/index.wxml
View file @
dfb4b39a
...
@@ -70,6 +70,7 @@
...
@@ -70,6 +70,7 @@
lazy-load
lazy-load
mode="{{datas.componentData.style==='rowList' || datas.componentData.style==='heap'?'aspectFit':'widthFix'}}"
mode="{{datas.componentData.style==='rowList' || datas.componentData.style==='heap'?'aspectFit':'widthFix'}}"
class="productImgUrl"
class="productImgUrl"
binderror="errorFunction"
wx:if="{{datas.componentData.goodsImgType == 1}}"
wx:if="{{datas.componentData.goodsImgType == 1}}"
src="{{items.productImgUrl}}"
src="{{items.productImgUrl}}"
/>
/>
...
@@ -77,6 +78,7 @@
...
@@ -77,6 +78,7 @@
lazy-load
lazy-load
mode="{{datas.componentData.style==='rowList' || datas.componentData.style==='heap'?'aspectFit':'widthFix'}}"
mode="{{datas.componentData.style==='rowList' || datas.componentData.style==='heap'?'aspectFit':'widthFix'}}"
class="productImgUrl"
class="productImgUrl"
binderror="errorFunction"
wx:else
wx:else
src="{{items.coverImage}}"
src="{{items.coverImage}}"
/>
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment