search.wxml 1.4 KB

1234567891011121314151617181920212223242526
  1. <template name="search">
  2. <view class="search-container">
  3. <view class="search-video">
  4. <image class="icon" src="../../static/image/search.png"></image>
  5. <input placeholder="输入关键字" bindinput="focus"/>
  6. </view>
  7. <view class="title" wx:if="{{searchData.recommendList.length > 0}}">热门搜索</view>
  8. <view class="title" wx:elif="{{searchData.searchList.length > 0}}">搜索结果</view>
  9. <view class="no-find"wx:else>
  10. <text>没有找到相关的内容</text>
  11. <text>换个关键字再试试吧</text>
  12. </view>
  13. <scroll-view scroll-y style="height: 83%; overflow: hidden;">
  14. <view class="hot-video">
  15. <view class="hot-item" wx:for="{{searchData.searchList}}" wx:key="{{inedex}}" bindtap="details" data-id="{{item.id}}">
  16. <image src="{{item.iconImg}}"></image>
  17. </view>
  18. <!--推荐-->
  19. <view class="hot-item" wx:for="{{searchData.recommendList}}" wx:key="{{inedex}}" bindtap="details" data-id="{{item.courseId}}">
  20. <image src="{{item.courseIcon}}"></image>
  21. </view>
  22. </view>
  23. <view wx:if="{{(searchData.searchList.length > 0) || (searchData.recommendList.length > 0)}}" class="bottom" style="margin-bottom:28%;">已经拖到底啦</view>
  24. </scroll-view>
  25. </view>
  26. </template>