hot.wxml 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. <!-- <form bindsubmit="submitTest" report-submit="{{true}}" class="allBooks">
  16. <button formType="submit">Reset</button>
  17. </form> -->
  18. </view>
  19. <view class="hotSection">
  20. <view class="title">
  21. <view class="leftWrapper">
  22. <image class="recommendTag" src="../../static/image/course.png" alt="" />
  23. <text>本周课程推荐</text>
  24. </view>
  25. <view class="moreBtn" bindtap="openMore">更多></view>
  26. </view>
  27. <view class="hotWares" style="flex-direction:row;">
  28. <view wx:for="{{hotData.recommend}}" wx:key="{{index}}" class="hotWareCard" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
  29. <image class="wareCardImg" src="{{item.img}}" />
  30. <text class="wareCardTitle">{{item.title}}</text>
  31. <view class="bottomData">
  32. <text class="wareCardTip">{{item.summary}}</text>
  33. <!-- <view class="wareCardPlays">
  34. <image class="wareCardPlaysImg" src="../../static/image/hotPlays.png" />
  35. <text>{{item.plays}}</text>
  36. </view>
  37. <view class="wareCardLikes">
  38. <image class="wareCardLikesImg" src="../../static/image/like.png" />
  39. <text>{{item.likes}}</text>
  40. </view> -->
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="hotSection">
  46. <view class="title">
  47. <view class="leftWrapper">
  48. <image src="../../static/image/hot_recommend.png" alt="" />
  49. <text>人气推荐</text>
  50. </view>
  51. </view>
  52. <view class="hotWares">
  53. <view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="hotWareCard" bindtap="openWorks" data-readId="{{item.classId}}" data-title="{{item.title}}">
  54. <image class="wareCardImg" src="{{item.img}}" />
  55. <text class="wareCardTitle">{{item.title}}</text>
  56. <view class="bottomData">
  57. <text class="wareCardTip">{{item.summary}}</text>
  58. <view class="wareCardPlays">
  59. <image class="wareCardPlaysImg" src="../../static/image/hotPlays.png" />
  60. <text>{{item.plays}}</text>
  61. </view>
  62. <view class="wareCardLikes">
  63. <image class="wareCardLikesImg" src="../../static/image/like.png" />
  64. <text>{{item.likes}}</text>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </template>