<view class="media">
    <!-- 图片 -->
    <navigator url="#" class="item" wx:for="{{files.images}}" wx:key="attachmentid">
        <image src="{{item.url}}" data-index="{{index}}" data-type='image' mode="aspectFill" bindtap="viewMedias" />
        <image wx:if="{{delete}}" class="delete" src="/static/image/delete.png" data-item="{{item}}" bindtap="handleDeleteFile" />
    </navigator>
    <!-- 视频 -->
    <navigator url="#" class="item" wx:for="{{files.videos}}" wx:key="attachmentid">
        <image src="{{item.subfiles[0].url}}" mode="aspectFill" />
        <view class="shade" data-index="{{index}}" data-type='video' bindtap="viewMedias">
            <van-icon size='48rpx' name="play" />
        </view>
        <image wx:if="{{delete}}" class="delete" src="/static/image/delete.png" data-item="{{item}}" bindtap="handleDeleteFile" />
    </navigator>
    <!-- 文件 -->
    <navigator url="#" class="item file" wx:for="{{files.files}}" wx:key="attachmentid" data-item='{{item}}' bindtap="viewFlies">
        <image class="image" src="{{item.cover}}" mode="heightFix" />
        <view class="name">
            {{item.document}}
        </view>
        <image wx:if="{{delete}}" class="delete" src="/static/image/delete.png" data-item="{{item}}" catchtap="handleDeleteFile" />
    </navigator>
</view>
<!--  list="{{files.files}}" -->