hot_20190129191834.wxml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. <image class="messageIcon" src="../../static/image/message_icon.png" />
  28. <text class="messageText">{{hotData.unReadMessageContent}}</text>
  29. </view>
  30. <view class="myCourseSection">
  31. <view class="title">
  32. <view class="title-regular">我的课程</view>
  33. <view class="right" bindtap="toMyCourse" wx:if="{{hotData.myCourse.length > 3}}">
  34. 更多
  35. <image src="../../static/image/black_to.png" />
  36. </view>
  37. </view>
  38. <view class="myCoursePlaceHolder" wx:if="{{hotData.myCourse.length === 0}}" bindtap="goToBooks">
  39. <image src="../../static/image/add_class.png" />
  40. </view>
  41. <view class="book-box" wx:if="{{hotData.myCourse.length !== 0}}">
  42. <block wx:for="{{hotData.myCourse}}" wx:key="{{index}}">
  43. <view class="book-item" data-id="{{item.productId}}" bindtap="goToBook" data-title="{{item.title}}">
  44. <image class="book-img" src="{{item.iconImg}}"></image>
  45. <view class="book-title">{{item.title}}</view>
  46. </view>
  47. </block>
  48. </view>
  49. </view>
  50. <view class="searchSection">
  51. <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>
  52. <view>{{searchIcon}}</view>
  53. <view bindtap="inputFocus" class="searchBtn" wx:if="{{hotData.searchIcon}}">
  54. <!-- <icon type="search" size="14" /> -->
  55. <image src="../../static/image/search_new.png" alt="" />
  56. </view>
  57. <view class="allBooks" bindtap="goToBooks">全部课程</view>
  58. <!-- <form bindsubmit="submitTest" report-submit="{{true}}" class="allBooks">
  59. <button formType="submit">Reset</button>
  60. </form> -->
  61. </view>
  62. <view class="swiperSection">
  63. <view class="title-regular swiper-title">官方推荐</view>
  64. <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}}">
  65. <block wx:for="{{hotData.recommend}}" wx:key="{{index}}">
  66. <swiper-item class="slide-item" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
  67. <image src="{{item.img}}" data-type="{{item.type}}" data-id="{{item.id}}" class="slide-image" />
  68. <view class="slide-summary">
  69. <text class="slide-title">{{item.title}}</text>
  70. <text class="slide-tip">{{item.summary}}</text>
  71. </view>
  72. </swiper-item>
  73. </block>
  74. </swiper>
  75. <view class="swiper-dots-wrapper">
  76. <block wx:for="{{hotData.recommend}}" wx:key="{{index}}">
  77. <view class="swiper-dots {{hotData.swiperCurrent === index ? 'dot-active' : ''}}">
  78. <text>{{index + 1}}</text>
  79. </view>
  80. </block>
  81. </view>
  82. </view>
  83. <view class="recommdSection">
  84. <view class="recommd-title">热门作品</view>
  85. <view class="hotWares">
  86. <view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="worksCard" bindtap="openWorks" data-readId="{{item.classId}}" data-title="{{item.title}}">
  87. <view class="topData">
  88. <view class="worksLeft" catchtap="goToUsers" data-uid="{{item.uid}}">
  89. <image class="authorAvatar" lazy-load="true" src="{{item.avatar}}" />
  90. <view class="profession" wx:if="{{item.profession}}">
  91. {{item.profession}}
  92. </view>
  93. <view class="worksInfo">
  94. <view class="authorName">{{item.nickName}}</view>
  95. <view class="time">{{item.time}}</view>
  96. </view>
  97. </view>
  98. <view class="numberInfo">
  99. <view class="wareCardPlays">
  100. <image class="wareCardPlaysImg" lazy-load="true" src="../../static/image/hotPlays.png" />
  101. <text>{{item.plays}}</text>
  102. </view>
  103. <view class="wareCardLikes">
  104. <image class="wareCardLikesImg" lazy-load="true" src="../../static/image/flower_small_pink.png" />
  105. <text>{{item.likes}}</text>
  106. </view>
  107. </view>
  108. </view>
  109. <image class="wareCardImg" src="{{item.img}}" />
  110. <view class="titleSummary">
  111. <text class="wareCardTitle">{{item.title}}</text>
  112. <text class="wareCardTip">{{item.summary}}</text>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. </template>