course.wxml 2.4 KB

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