hot.wxml 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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">更多></view>
  27. </view>
  28. <view class="hotWares" style="flex-direction:row;">
  29. <view wx:for="{{hotData.recommend}}" wx:key="{{index}}" class="hotWareCard" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
  30. <image class="wareCardImg" src="{{item.img}}" />
  31. <view class="titleSummary">
  32. <text class="wareCardTitle">{{item.title}}</text>
  33. <text class="wareCardTip">{{item.summary}}</text>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="recommdSection">
  39. <view class="title">
  40. <view class="leftWrapper">
  41. <image src="../../static/image/hot_recommend.png" alt="" />
  42. <text>热门作品</text>
  43. </view>
  44. </view>
  45. <view class="hotWares">
  46. <view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="worksCard" bindtap="openWorks" data-readId="{{item.classId}}" data-title="{{item.title}}">
  47. <view class="topData">
  48. <view class="worksLeft">
  49. <image class="authorAvatar" src="{{item.avatar}}" />
  50. <view class="worksInfo">
  51. <view class="authorName">{{item.nickName}}</view>
  52. <view class="time">{{item.time}}</view>
  53. </view>
  54. </view>
  55. <view class="numberInfo">
  56. <view class="wareCardPlays">
  57. <image class="wareCardPlaysImg" src="../../static/image/hotPlays.png" />
  58. <text>{{item.plays}}</text>
  59. </view>
  60. <view class="wareCardLikes">
  61. <image class="wareCardLikesImg" src="../../static/image/like.png" />
  62. <text>{{item.likes}}</text>
  63. </view>
  64. </view>
  65. </view>
  66. <image class="wareCardImg" src="{{item.img}}" />
  67. <view class="titleSummary">
  68. <text class="wareCardTitle">{{item.title}}</text>
  69. <text class="wareCardTip">{{item.summary}}</text>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </template>