courses.wxml 1.6 KB

123456789101112131415161718192021
  1. <!-- <wxs src="../../pages/commonWxs/format.wxs" module="format" /> -->
  2. <template name="courses">
  3. <view class="courses_container">
  4. <view class="course_item" bindtap="goToReading" wx:for="{{coursesData}}" data-id="{{item.userRead.exampleId}}" wx:key="index">
  5. <image class="course_icon" src="{{item.userRead.iconImg}}" lazy-load="true" />
  6. <view class="course_info">
  7. <text class="course_title">{{item.userRead.title}}</text>
  8. <view class="course_btn_wrapper">
  9. <view class="collect course_btn" data-index="{{index}}" data-id="{{item.userRead.id}}" data-type="{{item.userRead.type}}" catchtap="courseCollectTap">
  10. <image class="collect_icon btn_icon" src="{{item.isFavorites ?'../../static/index/star_colored.png' :'../../static/index/star.png' }}" />
  11. <text class="collect_text btn_text">{{item.isFavorites? '收藏' : '收藏'}}</text>
  12. </view>
  13. <view class="share course_btn" catchtap="coursesOpenShare" data-author="{{item.user.nickName}}" data-index="{{index}}" data-id="{{item.userRead.id}}" data-avatar="{{item.user.avatar}}" data-uid="{{item.user.uid}}" data-icon="{{item.userRead.iconImg}}" data-title="{{item.userRead.title}}" data-type="{{item.userRead.type}}">
  14. <image class="share_icon btn_icon" src="../../static/index/share.png" />
  15. <text class="share_text btn_text">分享</text>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>