hot.wxml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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="profession" wx:if="{{item.profession}}">{{item.profession}}</view>
  54. <view class="worksInfo">
  55. <view class="authorName">{{item.nickName}}</view>
  56. <view class="time">{{item.time}}</view>
  57. </view>
  58. </view>
  59. <view class="numberInfo">
  60. <view class="wareCardPlays">
  61. <text>{{item.plays}}</text>
  62. <image class="wareCardPlaysImg" lazy-load="true" src="../../static/image/hotPlays.png" />
  63. </view>
  64. <view class="wareCardLikes">
  65. <text>{{item.likes}}</text>
  66. <image class="wareCardLikesImg" lazy-load="true" src="../../static/image/like.png" />
  67. </view>
  68. </view>
  69. </view>
  70. <image class="wareCardImg" src="{{item.img}}" />
  71. <view class="titleSummary">
  72. <text class="wareCardTitle">{{item.title}}</text>
  73. <text class="wareCardTip">{{item.summary}}</text>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. </template>