<view>

  <view wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="mt20">
    <i-card title="{{item.name}}" data-index="{{index}}" i-class="pt30">
      <view slot="content">证书类型: {{item.type}}</view>
      <view slot="content" class="mt20">课程学时: {{item.totalXs/10}}</view>
      <view slot="content" class="mt20">学习时间: {{item.startDate}} 到 {{item.endDate}}</view>
      <view slot="content" class="mt20">
        证书编号：{{item.rzCode}}
      </view>

      <view slot="content" class="mt20 flex tc">
        <i-button inline type="primary" wx:if="{{item.signUrl}}" bindtap="preview" data-url="{{item.signUrl}}">查看证明
        </i-button>
        <i-button inline type="primary" wx:else bindtap="makeSign" data-index="{{index}}" >生成证明</i-button>
      </view>
    </i-card>
  </view>

  <view wx:if="{{from==-1}}" class="m20">
    <view class="padding tc">没有更多了</view>
  </view>
</view>

<modal title="打印学时证明"  hidden="{{!signModel}}" 
  cancel-text="取消" 
  bindcancel="cancelPrint"
  confirm-text="生成证明"
  bindconfirm="printCert" >
  <i-panel title="">
   <i-input title="证书编号" value="{{form.rzCode}}" name="rzCode" bind:change="updateRzcode"> </i-input>
  </i-panel>
</modal>