hot.wxml 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template name="hot">
  2. <swiper indicator-dots="{{hotData.indicatorDots}}" autoplay="{{hotData.autoplay}}" interval="{{hotData.interval}}" duration="{{hotData.duration}}" circular="{{hotData.circular}}">
  3. <block wx:for="{{hotData.banner}}" wx:key="{{index}}">
  4. <swiper-item>
  5. <image src="{{item.url}}" data-type="{{item.type}}" data-id="{{item.id}}" class="slide-image" width="750" height="318" />
  6. </swiper-item>
  7. </block>
  8. </swiper>
  9. <view class="searchSection">
  10. <input bindinput="inputHandler" bindconfirm="searchHandler" placeholder="{{hotData.hotSearch}}" placeholder-style="text-indent:20rpx" confirm-type="search"></input>
  11. <view bindtap="searchHandler" class="searchBtn">
  12. <!-- <icon type="search" size="14" /> -->
  13. <image src="../../static/image/search_new.png" alt="" />
  14. </view>
  15. <view class="allBooks" bindtap="goToBooks">全部课本</view>
  16. <!-- <form bindsubmit="submitTest" report-submit="{{true}}" class="allBooks">
  17. <button formType="submit">Reset</button>
  18. </form> -->
  19. </view>
  20. <view class="hotSection">
  21. <view class="title">
  22. <view class="leftWrapper">
  23. <image class="recommendTag" src="../../static/image/course.png" alt="" />
  24. <text>本周推荐</text>
  25. </view>
  26. <view class="moreBtn" bindtap="openMore">
  27. 更多
  28. <image src="../../static/image/to.png" />
  29. </view>
  30. </view>
  31. <view class="hotWares" style="flex-direction:row;">
  32. <view wx:for="{{hotData.recommend}}" wx:key="{{index}}" class="hotWareCard" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
  33. <image class="wareCardImg" src="{{item.img}}" />
  34. <view class="titleSummary">
  35. <text class="wareCardTitle">{{item.title}}</text>
  36. <text class="wareCardTip">{{item.summary}}</text>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="recommdSection">
  42. <view class="title">
  43. <view class="leftWrapper">
  44. <image src="../../static/image/hot_recommend.png" alt="" />
  45. <text>热门作品</text>
  46. </view>
  47. </view>
  48. <view class="hotWares">
  49. <view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="worksCard" bindtap="openWorks" data-readId="{{item.classId}}" data-title="{{item.title}}">
  50. <view class="topData">
  51. <view class="worksLeft" catchtap="goToUsers" data-uid="{{item.uid}}">
  52. <image class="authorAvatar" lazy-load="true" src="{{item.avatar}}" />
  53. <view class="worksInfo">
  54. <view class="authorName">{{item.nickName}}</view>
  55. <view class="time">{{item.time}}</view>
  56. </view>
  57. </view>
  58. <view class="numberInfo">
  59. <view class="wareCardPlays">
  60. <text>{{item.plays}}</text>
  61. <image class="wareCardPlaysImg" lazy-load="true" src="../../static/image/hotPlays.png" />
  62. </view>
  63. <view class="wareCardLikes">
  64. <text>{{item.likes}}</text>
  65. <image class="wareCardLikesImg" lazy-load="true" src="../../static/image/like.png" />
  66. </view>
  67. </view>
  68. </view>
  69. <image class="wareCardImg" src="{{item.img}}" />
  70. <view class="titleSummary">
  71. <text class="wareCardTitle">{{item.title}}</text>
  72. <text class="wareCardTip">{{item.summary}}</text>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </template>