hot.wxml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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}}" bindtap="bannerTap" 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. <view class="leftWrapper">
  19. <image class="recommendTag" src="../../static/image/course.png" alt="" />
  20. <text>本周课程推荐</text>
  21. </view>
  22. <view class="moreBtn" bindtap="openMore">更多></view>
  23. </view>
  24. <view class="hotWares" style="flex-direction:row;">
  25. <view wx:for="{{hotData.recommend}}" wx:key="{{index}}" class="hotWareCard" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
  26. <image class="wareCardImg" src="{{item.img}}" />
  27. <text class="wareCardTitle">{{item.title}}</text>
  28. <view class="bottomData">
  29. <text class="wareCardTip">{{item.grade}}</text>
  30. <!-- <view class="wareCardPlays">
  31. <image class="wareCardPlaysImg" src="../../static/image/hotPlays.png" />
  32. <text>{{item.plays}}</text>
  33. </view>
  34. <view class="wareCardLikes">
  35. <image class="wareCardLikesImg" src="../../static/image/like.png" />
  36. <text>{{item.likes}}</text>
  37. </view> -->
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="hotSection">
  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="hotWareCard" bindtap="openWorks" data-readId="{{item.classId}}" data-title="{{item.title}}">
  51. <image class="wareCardImg" src="{{item.img}}" />
  52. <text class="wareCardTitle">{{item.title}}</text>
  53. <view class="bottomData">
  54. <text class="wareCardTip">{{item.grade}}</text>
  55. <view class="wareCardPlays">
  56. <image class="wareCardPlaysImg" src="../../static/image/hotPlays.png" />
  57. <text>{{item.plays}}</text>
  58. </view>
  59. <view class="wareCardLikes">
  60. <image class="wareCardLikesImg" src="../../static/image/like.png" />
  61. <text>{{item.likes}}</text>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </template>