training.wxml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!--subpackages/training/training.wxml-->
  2. <view style="background: #f5f5f5; padding: 20rpx 0;">
  3. <view class="container">
  4. <!-- <view class="container"> -->
  5. <!-- 搜索框 -->
  6. <view class="search-bar">
  7. <input class="search-input" placeholder="搜索" />
  8. <image class="search-icon" src="{{sou}}" />
  9. </view>
  10. <!-- </view> -->
  11. <!-- 分类 -->
  12. <view class="category-tabs">
  13. <view wx:for="{{categories}}" wx:key="index">
  14. <view class="category-tab {{item.sort === categoriesindex ? 'active' : ''}}" bindtap="tabcategories" data-type="{{item.sort}}">{{item.name}}</view>
  15. </view>
  16. </view>
  17. <!-- 列表 -->
  18. <scroll-view
  19. class="list_boxsss"
  20. scroll-y="true"
  21. bindscrolltolower="loadMore"
  22. lower-threshold="10"
  23. >
  24. <view class="course-list {{viewType}}">
  25. <block wx:for="{{courseList}}" wx:key="id">
  26. <view class="card {{viewType}}" bindtap="goToGoodsList" data-item="{{item}}">
  27. <view class="cardimg {{viewType}}">
  28. <image style="width: 100%; height: 100%;" src="{{item.cover}}" />
  29. <view wx:if="{{ viewType === 'grid'}}" class="label {{item.type === 0 ? 'shipin' : item.type === 1 ? 'yinpin' : item.type === 2 ? 'PDF' : item.type === 3 ? 'PPT' : '图文'}} labelwg {{viewType}}" >{{item.type === 0 ? '视频' : item.type === 1 ? '音频' : item.type === 2 ? 'PDF' : item.type === 3 ? 'PPT' : '图文'}}</view>
  30. </view>
  31. <view style="padding: 16rpx;" class="title_box {{viewType}}">
  32. <view class="title">{{item.name}}</view>
  33. <view class="info">
  34. <view>
  35. {{item.range}}
  36. </view>
  37. <view wx:if="{{ viewType === 'grid'}}">
  38. 已有{{item.download_count}}人下载
  39. </view>
  40. </view>
  41. <view wx:if="{{ viewType === 'grid'}}" style="text-align: center;margin-top: 20rpx;" class="button_box {{viewType}}">
  42. <button class="preview-btns"><image class="download-icons" src="{{show_1}}" />在线预览</button>
  43. <image class="download-icon" src="{{xiazi}}" />
  44. </view>
  45. </view>
  46. <view style="display: flex;" wx:if="{{ viewType === 'list'}}">
  47. <button size="mini" style="padding: 0; background: none; color: #333333;" class="preview-btn">预览</button>
  48. <button size="mini" style="padding: 0; margin-left: 20rpx; background: none; color: #007aff;" class="preview-btn">下载</button>
  49. </view>
  50. </view>
  51. </block>
  52. </view>
  53. <view wx:if="{{ isLoading }}" class="loading-text">加载中...</view>
  54. <view wx:elif="{{ !hasMore }}" class="no-more-text">没有更多了</view>
  55. </scroll-view>
  56. <float />
  57. </view>
  58. </view>