materials.wxml 675 B

1234567891011121314
  1. <template name="materials">
  2. <scroll-view scroll-y="true">
  3. <view id="materials" >
  4. <view wx:if="{{!materials.length}}" class="no-info">暂无学习资料</view>
  5. <view wx:for="{{materials}}" wx:key="{{index}}" class="{{index === 0 ? 'material-wrapper first' : 'material-wrapper'}}" >
  6. <text class="name">{{item.courseware.name}}</text>
  7. <view class="btns">
  8. <text class="btn view" data-url="{{item.courseware.playUrl}}" bindtap="viewMaterial"></text>
  9. <text class="{{item.isFavourite ? 'collected btn' : 'btn collect'}}" data-id="{{item.courseware.id}}" bindtap="collectMaterial"></text>
  10. </view>
  11. </view>
  12. </view>
  13. </scroll-view>
  14. </template>