search.wxml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <view class='top'>
  2. <view class='page_row' bindtap="suo">
  3. <view class="search">
  4. <view class="df search_arr">
  5. <image class='search-icon' src='../../../images/search.png'></image>
  6. <input class="" focus bindblur='blur' bindinput='inText' placeholder-style='placText' placeholder="请输入事项名称" value="{{data.serviceName}}"/>
  7. <button wx:if='{{!setting}}' catchtap='mask'>
  8. <image class='record' src='../../../images/record.png'></image>
  9. </button>
  10. <button wx:if='{{setting}}' bindtap="openSetting">
  11. <image catchtap='mask' class='record' src='../../../images/record.png'></image>
  12. </button>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. <!-- 如果执行搜索就隐藏 -->
  18. <block wx:if='{{!data}}'>
  19. <view class='object'>
  20. <view class='object-title'>热门搜索</view>
  21. <view class='object-content'>
  22. <block wx:for='{{hotService}}' wx:key="{{item.serviceUnid}}">
  23. <view bindtap='nav' data-unid='{{item.serviceUnid}}'>{{item.serviceName}}</view>
  24. </block>
  25. </view>
  26. </view>
  27. <view class='object'>
  28. <view class='object-title-search'>
  29. <view>近期搜索</view>
  30. <view style="padding:20rpx;" bindtap="clearData">清除历史</view>
  31. </view>
  32. <view class='object-content'>
  33. <block wx:for='{{search}}' wx:key='{{item}}'>
  34. <view catchtap='blur' data-keys='{{item}}'>{{item}}</view>
  35. </block>
  36. </view>
  37. </view>
  38. </block>
  39. <!-- 搜索结果展示 -->
  40. <block wx:if='{{data}}'>
  41. <view class='search-content'>
  42. <block wx:for='{{data.preServiceList}}' wx:key='{{item.unid}}'>
  43. <view class='search-content-line' catchtap='nav' data-unid='{{item.unid}}'>
  44. <text>{{item.serviceName}}</text>
  45. <image src='../../../images/right.png'></image>
  46. </view>
  47. </block>
  48. </view>
  49. </block>
  50. <view wx:if='{{data.preServiceList.length==0||data.preServiceList==""}}' class='noList'>
  51. <image src='../../../images/list_null.png'></image>
  52. <view>暂无数据</view>
  53. </view>
  54. <!-- 遮罩层 -->
  55. <view class='mask' wx:if='{{mask}}'>
  56. <view catchtap='clear' class='allMask'></view>
  57. <view class="myRecode">
  58. <view class="recode" catchtouchstart='recodeClick' catchtouchend='recodeEnd'>
  59. <image style="width:200rpx;height:200rpx;" src="../../../images/listen.png"></image>
  60. <view class="ripple"></view>
  61. <view class="ripple {{animationStatus?'rippleAnimation1':''}}"></view>
  62. <view class="ripple {{animationStatus?'rippleAnimation2':''}}"></view>
  63. <view class="ripple {{animationStatus?'rippleAnimation3':''}}"></view>
  64. </view>
  65. </view>
  66. </view>
  67. <!-- <button open-type="openSetting" bindopensetting="callback">打开设置页</button> -->