2 回复
可以,如:
json结构(对象数组):
item: {
images:
[{ “src”: “xxxxxx”, “iscover”: false },
{ “src”: “xxxxxx”, “iscover”: false },
{ “src”: “xxxxxx”, “iscover”: true },
{ “src”: “xxxxxx”, “iscover”: false }]
}
<!-- 显示封面图片 -->
<block wx:for="{{item.images}}" wx:for-item=“image” wx:key="{{index}}">
<block wx:if="{{image.iscover}}">
<image src=’{{image.src}}’ mode=“aspectFill”></image>
</block>
</block>