index.wxml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!-- <view class='action-panel'>
  2. <view class='search-box'>
  3. <view class='search'>
  4. <i-icon type="search" size='20' color='#cbcdd3' />
  5. <input class='search-input' confirm-type="search" value="{{inputValue}}" bindblur='bindKeyInput' placeholder="输出城市名快速查找" placeholder-style="color:#cbcdd3;" />
  6. </view>
  7. <navigator open-type='navigateBack'>
  8. <text>取消</text>
  9. </navigator>
  10. </view>
  11. </view> -->
  12. <view class='app-header'>
  13. <!-- <view class='map' bindtap='toCity'>
  14. <view class='location'>
  15. <image src='/images/happyjob/index_position.png'></image>
  16. </view>
  17. <text class='cityname'>{{cityName}}</text>
  18. <i-icon class="arrow-down" type="play_fill" />
  19. </view> -->
  20. <view class='search' bindtap='toSearch'>
  21. <view class="search-content">
  22. <view class='i_search'>
  23. <image src='/images/happyjob/search.png'></image>
  24. </view>
  25. <input class='search-input' confirm-type="search" value="{{inputValue}}" bindblur='bindKeyInput'
  26. placeholder="输出城市名快速查找" placeholder-class="placeholder" />
  27. </view>
  28. <!-- <view class="btn-search">搜索</view> -->
  29. </view>
  30. <view class="cancel" bindtap="back">取消</view>
  31. </view>
  32. <view hidden='{{inputValue}}' class="safe_area">
  33. <block wx:if="{{isShowLetter}}">
  34. <view class="showSlectedLetter">
  35. {{showLetter}}
  36. </view>
  37. </block>
  38. <!-- catchtouchstart="searchStart" catchtouchmove="searchMove" catchtouchend="searchEnd" -->
  39. <view class="searchLetter touchClass">
  40. <view wx:for="{{searchLetter}}" style="height:{{itemH}}px" wx:key="index" data-letter="{{item.name}}"
  41. bindtap="toView">{{item.name}}</view>
  42. </view>
  43. <scroll-view scroll-y="true" style="height:{{winHeight}}px" bindscroll="bindScroll" scroll-into-view="{{letter}}">
  44. <view class="selection" wx:for="{{cityList}}" wx:key="index" id="{{item.firstNameLetter}}">
  45. <block wx:if="{{index===0}}">
  46. <!-- <view class='panel'>定位城市</view> -->
  47. <view class='location_city'>
  48. <view data-text="{{currcity}}" data-code="{{currcityCode}}">
  49. <text>{{currcity}}</text>
  50. <!-- <text class="active">当前定位</text> -->
  51. <text class="active">当前城市</text>
  52. </view>
  53. <!--
  54. <view class='position' catchtap="cxgps">
  55. <i-icon type="refresh" />
  56. <text>重新定位</text>
  57. </view>
  58. -->
  59. </view>
  60. <view class='panel' wx:if="{{hotList.length}}">热门城市</view>
  61. <view class='hot_city' wx:if="{{hotList.length}}">
  62. <view class="btn" wx:for="{{hotList}}" wx:key="index" wx:for-index="idx" data-text="{{item.cityName}}"
  63. data-code="{{item.cityCode}}" data-index="{{index}}" bindtap="chooseHotCity">{{item.cityName}}</view>
  64. </view>
  65. </block>
  66. <view class="item_letter">{{item.firstNameLetter}}</view>
  67. <view class="item_city" wx:for="{{item.cityInfo}}" wx:for-item="ct" wx:key="index" wx:for-index="idx"
  68. data-text="{{ct.cityName}}" data-code='{{ct.cityCode}}' data-index="{{index}}" data-idx="{{idx}}"
  69. bindtap="chooseCity">
  70. {{ct.cityName}}
  71. </view>
  72. </view>
  73. </scroll-view>
  74. </view>
  75. <view class='result-list' wx:if="{{inputValue}}" style="margin-top:20px">
  76. <view class="item_city" wx:for="{{searchList}}" wx:key="index" data-text="{{item.cityName}}" data-index="{{index}}"
  77. data-code="{{item.cityCode}}" bindtap="chooseSearchCity">{{item.cityName}}</view>
  78. </view>