hot.wxml 4.2 KB

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