hot_20190325152225.wxml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template name="hot">
  2. <!-- <view class="messageSection" wx:if="{{hotData.unReadMessageNum > 0}}" bindtap="goToMessage"> -->
  3. <!-- <view class="marquee">
  4. <view class="content">
  5. <text>【新春派兑】小红花兑换乐高玩具,6666朵小红花可兑换价值约500元的乐高积木玩具,2月26日兑换。</text>
  6. <text style="display: inline-block; width: 5em;"></text>
  7. <text>【新春派兑】小红花兑换乐高玩具,6666朵小红花可兑换价值约500元的乐高积木玩具,2月26日兑换。</text>
  8. <text style="display: inline-block; width: 5em;"></text>
  9. <text>【新春派兑】小红花兑换乐高玩具,6666朵小红花可兑换价值约500元的乐高积木玩具,2月26日兑换。</text>
  10. <text style="display: inline-block; width: 5em;"></text>
  11. </view>
  12. </view> -->
  13. <!-- <view class="messageSection" >
  14. <image class="messageIcon" src="../../static/image/message_icon.png" />
  15. <view class="marquee">
  16. <view class="content">
  17. <text>{{hotData.unReadMessageContent}}</text>
  18. <text style="display: inline-block; width: 5em;"></text>
  19. <text>{{hotData.unReadMessageContent}}</text>
  20. <text style="display: inline-block; width: 5em;"></text>
  21. <text>{{hotData.unReadMessageContent}}</text>
  22. <text style="display: inline-block; width: 5em;"></text>
  23. </view>
  24. </view>
  25. </view> -->
  26. <!-- <view class="messageSection" bindtap="goToMessage" wx:if="{{hotData.isMessageNormal}}"> -->
  27. <view class="messageSection" bindtap="goToMessage">
  28. <image class="messageIcon" src="../../static/image/message_icon.png" />
  29. <text class="messageText">{{hotData.unReadMessageContent}}</text>
  30. </view>
  31. <view class="myCourseSection">
  32. <view class="title">
  33. <view class="title-regular">我的课程</view>
  34. <view class="right" bindtap="toMyCourse" wx:if="{{hotData.myCourse.length > 3}}">
  35. 更多
  36. <image src="../../static/image/black_to.png" />
  37. </view>
  38. </view>
  39. <view class="myCoursePlaceHolder" wx:if="{{hotData.myCourse.length === 0}}" bindtap="goToBooks">
  40. <image src="../../static/image/add_class.png" />
  41. </view>
  42. <view class="book-box" wx:if="{{hotData.myCourse.length !== 0}}">
  43. <block wx:for="{{hotData.myCourse}}" wx:key="{{index}}">
  44. <view class="book-item" data-id="{{item.productId}}" bindtap="goToBook" data-title="{{item.title}}">
  45. <image class="book-img" src="{{item.iconImg}}"></image>
  46. <view class="book-title">{{item.title}}</view>
  47. </view>
  48. </block>
  49. </view>
  50. </view>
  51. <view class="searchSection">
  52. <input bindinput="inputHandler" value="{{hotData.inputValue}}" focus="{{hotData.inputFocus}}" bindfocus="searchIconDisappear" bindblur="searchIconCome" bindconfirm="searchHandler" placeholder="{{hotData.hotSearch}}" placeholder-style="text-indent:20rpx" confirm-type="search"></input>
  53. <view>{{searchIcon}}</view>
  54. <view bindtap="inputFocus" class="searchBtn" wx:if="{{hotData.searchIcon}}">
  55. <!-- <icon type="search" size="14" /> -->
  56. <image src="../../static/image/search_new.png" alt="" />
  57. </view>
  58. <view class="allBooks" bindtap="goToBooks">全部课程</view>
  59. <!-- <form bindsubmit="submitTest" report-submit="{{true}}" class="allBooks">
  60. <button formType="submit">Reset</button>
  61. </form> -->
  62. </view>
  63. <view class="swiperSection">
  64. <view class="title-regular swiper-title">官方推荐</view>
  65. <swiper previous-margin="0" next-margin="243rpx" bindchange="swiperChange" current="{{hotData.swiperCurrent}}" circular="{{true}}" autoplay="{{hotData.autoplay}}" interval="{{hotData.interval}}" duration="{{hotData.duration}}" circular="{{hotData.circular}}">
  66. <block wx:for="{{hotData.recommend}}" wx:key="{{index}}">
  67. <swiper-item class="slide-item" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
  68. <image src="{{item.img}}" data-type="{{item.type}}" data-id="{{item.id}}" class="slide-image" />
  69. <view class="slide-summary">
  70. <text class="slide-title">{{item.title}}</text>
  71. <text class="slide-tip">{{item.summary}}</text>
  72. </view>
  73. </swiper-item>
  74. </block>
  75. </swiper>
  76. <view class="swiper-dots-wrapper">
  77. <block wx:for="{{hotData.recommend}}" wx:key="{{index}}">
  78. <view class="swiper-dots {{hotData.swiperCurrent === index ? 'dot-active' : ''}}">
  79. <text>{{index + 1}}</text>
  80. </view>
  81. </block>
  82. </view>
  83. </view>
  84. <view class="recommdSection">
  85. <view class="recommd-title">热门作品</view>
  86. <view class="hotWares">
  87. <view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="worksCard" bindtap="openWorks" data-readId="{{item.classId}}" data-title="{{item.title}}">
  88. <view class="topData">
  89. <view class="worksLeft" catchtap="goToUsers" data-uid="{{item.uid}}">
  90. <image class="authorAvatar" lazy-load="true" src="{{item.avatar}}" />
  91. <view class="profession" wx:if="{{item.profession}}">
  92. {{item.profession}}
  93. </view>
  94. <view class="worksInfo">
  95. <view class="authorName">{{item.nickName}}</view>
  96. <view class="time">{{item.time}}</view>
  97. </view>
  98. </view>
  99. <view class="numberInfo">
  100. <view class="wareCardPlays">
  101. <image class="wareCardPlaysImg" lazy-load="true" src="../../static/image/hotPlays.png" />
  102. <text>{{item.plays}}</text>
  103. </view>
  104. <view class="wareCardLikes">
  105. <image class="wareCardLikesImg" lazy-load="true" src="../../static/image/flower_small_pink.png" />
  106. <text>{{item.likes}}</text>
  107. </view>
  108. </view>
  109. </view>
  110. <image class="wareCardImg" src="{{item.img}}" />
  111. <view class="titleSummary">
  112. <text class="wareCardTitle">{{item.title}}</text>
  113. <text class="wareCardTip">{{item.summary}}</text>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. </template>