<!--miniprogram/pages/marvellous/index.wxml-->
<view class="marvellous">
  <startAn wx:if="{{pageType === 'video' && showAnVideo}}" bindclose="closeAnvido"></startAn>
  <view class="htead"></view>
  <view wx:if="{{!showAnVideo}}">
    <view class="bg">
      <!-- <text>{{item.title}}</text> -->
      <van-empty  wx:if="{{!pageList.length}}" description="暂无数据" />
      <view class="icon_container" >
        <view class="icon_item_cell"  wx:for="{{pageList}}" wx:for-item="v" wx:for-index="o" wx:key="_id"
          data-index="{{v.index}}" data-key="{{index}}" data-o="{{o}}" data-url="{{v.url}}" bindtap="showImg"
          bindlongtap="longtap">
          <cover-view wx:if="{{showSelect}}" class="btnClose {{ v.select ? 'act': '' }}" size="{{20}}">√</cover-view>
          <image style="background-color: #000" mode="aspectFit" wx:if="{{pageType === 'img'}}" class="img"
            src="{{v.url}}" lazy-load="{{true}}">
          </image>
          <image style="background-color: #000" mode="aspectFit" bindlongtap="longtap" class="img" wx:if="{{v && v.url && pageType === 'video'}}"
            src="{{v.img}}" lazy-load="{{true}}">
          </image>
          <!-- <video custom-cache="{{false}}" show-progress="{{false}}" show-fullscreen-btn="{{false}}" show-play-btn="{{false}}"
            show-center-play-btn="{{false}}" bindlongtap="longtap" wx:if="{{v && v.url && pageType === 'video'}}" class="video {{}}"
            src="{{v.url}}"></video> -->
          <view class="title">{{v.title}}</view>
        </view>
      </view>
    </view>
  </view>
  <view class="bottomBtn" wx:if="{{showSelect}}">
    <view class="btn" bindtap="longClose">取消</view>
    <view class="btn" style="border-left: 1rpx solid #fff;" bindtap="saveAsset">确认（{{select.count}}）</view>
  </view>

  <!-- 视频 -->
  <view class="videoM " style="display: {{showVideo == '' ? 'none': 'block'}}">
    <mp-icon class="close" icon="close2" color="#fff" size="{{25}}" bindtap="closeVideo"></mp-icon>
    <video initial-time='0.01' custom-cache="{{false}}" show-play-btn="{{true}}" wx:if="{{showVideo}}" class="v" src="{{showVideo}}"></video>
  </view>
</view>