<view>
  <view>
    <view style='background-color:#fff;margin-top:20rpx;'>
      <view class='upload'>
        <view class='upload-title'>
          上传资料
        </view>
        <view class='upload-img'>
          <image bindtap='uploadFile' src='../../../images/upload.png'></image>
        </view>
      </view>
    </view>
    <view style='background-color:#fff;margin-top:20rpx;padding-bottom:60rpx;'>
      <view style='width:690rpx;margin:0 auto;'>
        <view class='content'>
          <view class='upload-title'>
            <text class='content-title-text'>我的材料</text>
            <text class='content-title-number'>（共{{image.length}}项）</text>
          </view>
          <view class='edit' bindtap='edit'>
            <text wx:if="{{edit}}">完成</text>
            <text wx:else>编辑</text>
          </view>
        </view>
        <view class='img' wx:for='{{image}}' wx:key='{{item.id}}'>
          <view class='img_title'>
            <text>{{item.materialName}}</text>
            <!-- <image src='../../../images/wode_guanzhu.png'></image> -->
          </view>
          <view class='img-content'>
            <view class='bdimg'  wx:for='{{item.materialUrl}}' wx:for-item='i' wx:for-index='ind' wx:key='{{ind}}'>
              <image catchtap='preview' data-url='{{url}}{{i.url}}' data-urlArr='{{item.materialUrl}}' data-http='{{url}}' mode="aspectFill" src='{{url}}{{i.url}}'></image>
              <image class='delete-img' wx:if='{{edit}}' catchtap='deleteImg' data-id='{{i.id}}' style='width:50rpx;height:50rpx;' src='../../../images/delete_img.png'></image>
            </view>
            <!-- <view class='image'>
              <image catchtap='mask' data-index='0' src='../../../images/upload.png'></image>
              // catchtap='image'
            </view> -->
          </view>
        </view>
      </view>
    </view>
  </view>
  <!-- 遮罩层 -->
  <view class='mask' wx:if='{{mask}}'>
    <view>
      <view class='mask_content'>
        <text>请输入材料名称</text>
        <view class='mask-input'>
          <input bindblur='dataName' adjust-position='true'></input>
        </view>
        <view class='mask-btn'>
          <view class='mask-clear' catchtap='clear'>取消</view>
          <view class='mask-true' catchtap='maskSubmit'>确认</view>
        </view>
      </view>
      <!-- <view class='clear'>
        <image catchtap='clear' src='../../../images/clear.png'></image>
      </view> -->
    </view>
  </view>
</view>
