search.wxml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!--pages/search/search.wxml-->
  2. <!-- 搜素框 -->
  3. <view class="search_box" bind:tap="showResult">
  4. <view class="base_search">
  5. <van-icon name="search" size="50rpx" color="#696969" style="margin-top: 15rpx; margin-left: -430rpx;"/>
  6. <input type="search" name="" placeholder="搜索..." bindinput="getInputValue" value="{{inputValue}}" class="search_text"/>
  7. <van-icon name="cross" style="float: right; margin-top: 24rpx; margin-right: 15rpx;" bind:tap="deleteInput"/>
  8. </view>
  9. <!-- 搜索按钮 -->
  10. <view class="search_button" bind:tap="onClose" catch:tap="searchBegin" data-searchdata="{{inputValue}}">搜索</view>
  11. </view>
  12. <!-- 搜索结果展示 -->
  13. <!-- 当搜索框数据不为0才显示搜索结果 wx:if="{{inputValue != ''}}" -->
  14. <!-- <view class="searchResult" wx:if="{{inputValue != ''}}" hidden="{{show ? false : true}}"> -->
  15. <!-- 单个结果 -->
  16. <!-- <view class="preResult" wx:for="{{searchResult}}" wx:key="index" bind:tap="putInputValue" data-postname="{{item.title}}"> -->
  17. <!-- <text class="textResult">{{item.title}}</text> -->
  18. <!-- <van-icon name="arrow" style="float: right; margin-top: 10rpx;"/> -->
  19. <!-- </view> -->
  20. <!-- </view> -->
  21. <!-- 搜索历史 -->
  22. <view class="history">
  23. <view class="history_title">搜索历史</view>
  24. <!-- 清空 -->
  25. <view class="empty" catch:tap="remove">
  26. <van-icon name="delete-o"/>\t
  27. <text>清空</text>
  28. </view>
  29. <!-- 历史记录展示 -->
  30. <scroll-view class="scroll" scroll-y="true">
  31. <view class="history_show">
  32. <view class="history_card" wx:for="{{historyStorage}}" wx:key="index" bind:tap="copyHistory" data-history="{{item}}">
  33. <text space="nbsp">{{item}}</text>
  34. </view>
  35. </view>
  36. </scroll-view>
  37. </view>
  38. <!-- 猜你喜欢界面 -->
  39. <view class="prefer">
  40. <!-- 标题 -->
  41. <view style="font-size: 35rpx; margin-left: 8rpx; color: #494545;">猜你喜欢</view>
  42. <!-- 刷新 -->
  43. <view class="refresh">
  44. <van-icon name="replay" color="#494545"/>
  45. </view>
  46. <!-- 商品卡片展示 -->
  47. <view class="commodity">
  48. <view class="commodity_card">
  49. <image src="https://img.js.design/assets/smartFill/img352164da74c4b8.jpeg" mode="" class="commodity_img"/>
  50. <avater class="avater"></avater>
  51. </view>
  52. </view>
  53. </view>