hot.wxml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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.imgUrls}}" wx:key="{{index}}">
  4. <swiper-item>
  5. <image src="{{item}}" 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. <button bindtap="searchHandler" class="searchBtn" plain="{{true}}">
  12. <icon type="search" size="17" />
  13. </button>
  14. <view class="allBooks" bindtap="goToBooks">全部课本</view>
  15. </view>
  16. <view class="hotSection">
  17. <view class="title">
  18. <image src="../../static/image/hot_recommend.png" alt="" />
  19. <text>人气推荐</text>
  20. </view>
  21. <view class="hotWares" style="flex-direction:row;">
  22. <view wx:for="{{hotData.wareCards}}" wx:key="{{index}}" class="hotWareCard" bindtap="openWorks" data-classId="{{item.classId}}" data-title="{{item.title}}">
  23. <!-- <image class="wareCardImg" src="{{item.img}}" />
  24. <view wx:if="{{index===0}}" class="wrapper">
  25. <text class="wareCardTitle">{{item.title}}</text>
  26. <view class="bottomData">
  27. <text class="wareCardTip">{{item.grade}}</text>
  28. <view class="wareCardPlays">
  29. <image class="wareCardPlaysImg" src="../../static/image/hotPlays.png" />
  30. <text>{{item.plays}}</text>
  31. </view>
  32. <view class="wareCardLikes">
  33. <image class="wareCardLikesImg" src="../../static/image/like.png" />
  34. <text>{{item.likes}}</text>
  35. </view>
  36. </view>
  37. </view>
  38. <view wx:if="{{index!==0}}">
  39. <text class="wareCardTitle">{{item.title}}</text>
  40. <text class="wareCardTip">{{item.grade}}</text>
  41. <view class="bottomData">
  42. <view class="wareCardPlays">
  43. <image class="wareCardPlaysImg" src="../../static/image/hotPlays.png" />
  44. <text>{{item.plays}}</text>
  45. </view>
  46. <view class="wareCardLikes">
  47. <image class="wareCardLikesImg" src="../../static/image/like.png" />
  48. <text>{{item.likes}}</text>
  49. </view>
  50. </view>
  51. </view> -->
  52. <image class="wareCardImg" src="{{item.img}}" />
  53. <text class="wareCardTitle">{{item.title}}</text>
  54. <view class="bottomData">
  55. <text class="wareCardTip">{{item.grade}}</text>
  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. </view>
  67. </view>
  68. <view class="hotSection">
  69. <view class="title">
  70. <image class="recommendTag" src="../../static/image/class_recommend.png" alt="" />
  71. <text>本周课程推荐</text>
  72. </view>
  73. <view class="hotWares" style="flex-direction:row;">
  74. <view wx:for="{{hotData.wareCards}}" wx:key="{{index}}" class="hotWareCard" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
  75. <image class="wareCardImg" src="{{item.img}}" />
  76. <text class="wareCardTitle">{{item.title}}</text>
  77. <view class="bottomData">
  78. <text class="wareCardTip">{{item.grade}}</text>
  79. <view class="wareCardPlays">
  80. <image class="wareCardPlaysImg" src="../../static/image/hotPlays.png" />
  81. <text>{{item.plays}}</text>
  82. </view>
  83. </view>
  84. <view wx:if="{{index!==0}}">
  85. <text class="wareCardTitle">{{item.title}}</text>
  86. <text class="wareCardTip">{{item.grade}}</text>
  87. <view class="bottomData">
  88. <view class="wareCardPlays">
  89. <image class="wareCardPlaysImg" src="../../static/image/hotPlays.png" />
  90. <text>{{item.plays}}</text>
  91. </view>
  92. <view class="wareCardLikes">
  93. <image class="wareCardLikesImg" src="../../static/image/like.png" />
  94. <text>{{item.likes}}</text>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. </template>