search.wxml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <!-- 搜索框 -->
  2. <view class="hmly-search">
  3. <view class="hmly-search-left">
  4. <text class="icon-search"></text>
  5. <input placeholder="搜索你想听的节目" bindconfirm="search"></input>
  6. </view>
  7. <view class="hmly-search-right" bindtap="cancelSearch">取消</view>
  8. </view>
  9. <!-- 搜索历史 -->
  10. <view class="hmly-history" wx:if="{{searchHistory.length}}">
  11. <!-- 提示标题 -->
  12. <view class="hmly-title">
  13. <view class="hmly-title-text">搜索历史</view>
  14. <text class="icon-delete text-gray" bindtap="clearHistory"></text>
  15. </view>
  16. <!-- 内容 -->
  17. <view class="hmly-history-content">
  18. <view class="hmly-content-item bg-gray text-black" wx:for="{{searchHistory}}" wx:key="index">{{item}}</view>
  19. </view>
  20. </view>
  21. <!-- 热门搜索 -->
  22. <view class="hmly-hot">
  23. <!-- 提示标题 -->
  24. <view class="hmly-title">
  25. <view class="title-text">热门搜索</view>
  26. </view>
  27. <view class="hmly-hot-content">
  28. <view class="hmly-hot-items" wx:for="{{hotData}}" wx:key="index">
  29. <view class="hmly-item-left">
  30. <view class="{{index < 3 ? 'text-red' : ''}}">{{index + 1}}</view>
  31. <view class="hmly-item-title text-black">{{item.title}}</view>
  32. </view>
  33. <text class="{{item.icon}} {{item.color}}"></text>
  34. </view>
  35. </view>
  36. </view>