index.wxml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <wxs src="../../utils/filter.wxs" module="filters" />
  2. <view class="classBox">
  3. <!-- 搜索 -->
  4. <block>
  5. <view class="searchBox" wx:if="{{type=='search'}}">
  6. <input class="input" bindfocus='cleanPlaceholder' bindblur='setPlaceholder' placeholder="{{placeholderText}}"bindconfirm='search' confirm-type='send' bindinput="setSearch"
  7. value="{{text}}" maxlength='20' />
  8. <view class="searchBtn" catchtap="search">
  9. <image src="/static/search-2.png" class="img" />
  10. </view>
  11. </view>
  12. <view class="historyList" wx:if="{{text==''&&list.length==0}}">
  13. <view class="notes" wx:for="{{historySearch}}" wx:key="index" data-text="{{item}}" bindtap="historySearch">
  14. <view class="left">
  15. <image src="/static/clock.png" class="clock" />
  16. {{item}}
  17. </view>
  18. <view class="delete" data-text="{{item}}" catchtap="deleteHistory">
  19. ×
  20. </view>
  21. </view>
  22. <view class="clearHistory" bindtap="clearHistory" wx:if="{{historySearch.length>0}}">
  23. 清除搜索记录
  24. </view>
  25. </view>
  26. </block>
  27. <!-- 内容区域 -->
  28. <scroll-view class="classify" scroll-x="true" scroll-into-view="{{currentId}}" enhanced show-scrollbar="{{false}}"
  29. wx:if="{{type=='class'&&!childType}}">
  30. <view id="{{'class'+index}}" class="name {{currentIndex==index?'currentClass':''}}" wx:for="{{categoryList}}"
  31. wx:key="id" data-index="{{index}}" data-title='{{item.title}}' bindtap="setClass">
  32. {{item.title}}
  33. </view>
  34. </scroll-view>
  35. <scroll-view wx:if="{{list.length>0}}" class="worksList" style="{{childType?'padding-top:10rpx':''}}"
  36. scroll-y="true" enhanced show-scrollbar="{{false}}" scroll-top="{{scrollTop}}" bindscrolltolower='loadMore'
  37. bindtouchstart="touchStart" bindtouchend="touchEnd">
  38. <view class="worksBox" wx:for="{{list}}" wx:key="id" data-id="{{item.id}}" bindtap="goRead">
  39. <view class="left">
  40. <image src="{{item.coverImg}}" class="cover" wx:if="{{item.resourcesType==0}}" />
  41. <view class="audioCover" style="background-image: url({{item.backgroundVirtualImg}});" wx:else>
  42. <image src="/static/audioBg.png" class="audioPlayBg" />
  43. <image src="/static/zhen.png" class="audioPlayZhen" />
  44. <image src="{{item.coverImg}}" class="cover" />
  45. </view>
  46. <view class="work">
  47. <view class="title textOver">{{item.title}}</view>
  48. <view class="statistics">
  49. <view class="statistic">
  50. <image src="/static/zp.png" class="playImg" mode="" />
  51. <view class="num">{{filters.numFilter(item.readAmount)|| 0}}</view>
  52. </view>
  53. <view class="statistic">
  54. <image src="/static/play2.png" class="playImg" mode="" />
  55. <view class="num">{{filters.numFilter(item.playAmount)|| 0}}</view>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. <view class="goRead">去朗读</view>
  61. </view>
  62. </scroll-view>
  63. <emptyBg wx:if="{{text!=''&&nullList}}" message="没有找到想要的内容~"></emptyBg>
  64. </view>