search.wxml 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. <view class="search">
  2. <view class="top">
  3. <view class="input">
  4. <text class="icon iconfont icon-search"></text>
  5. <input placeholder="请输入搜索关键词" placeholder-class="placeholder" confirm-type="search" bindinput="bindinput" value="{{value}}" bindconfirm="bindSearch" focus />
  6. </view>
  7. <view class="btn" bindtap="bindSearch">搜索</view>
  8. </view>
  9. <view class="content" hidden="{{search}}">
  10. <view class="hot">
  11. <view class="title">热门标签</view>
  12. <view class="label">
  13. <text wx:for="{{hotLabel}}" wx:key="unique" data-text="{{item.keyword}}" bindtap="bindLabel">{{item.keyword}}</text>
  14. </view>
  15. </view>
  16. <view class="record" wx:if="{{record.length>0}}">
  17. <view class="title">搜索记录</view>
  18. <view class="label">
  19. <text wx:for="{{record}}" wx:key="unique" data-text="{{item}}" bindtap="bindLabel">{{item}}</text>
  20. </view>
  21. <view class="clean" bindtap="clean">清空搜索记录</view>
  22. </view>
  23. </view>
  24. <view class="searchResult" hidden="{{!search}}">
  25. <view class="list" wx:if="{{dataList.length>0&&type!='goods'}}" wx:for="{{dataList}}" wx:key="unique" bindtap="choose" data-aid="{{item.aid}}">{{item.title}}</view>
  26. <goodList list="{{dataList}}" wx:if="{{dataList.length>0&&type=='goods'}}"></goodList>
  27. <view class="noData" wx:if="{{dataList.length==0}}">
  28. <view class="column">
  29. <view class="icon-info"></view>
  30. <view class="col-text">没有查找到您想找的内容</view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>