index.wxml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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='{{imgServerUrl}}/images/happyjob/search.png'></image>
  24. </view>
  25. <input class='search-input' confirm-type="search" value="{{inputValue}}" bindblur='bindKeyInput' placeholder="输出城市名快速查找" placeholder-style="color:#cbcdd3;" />
  26. </view>
  27. <view class="btn-search">搜索</view>
  28. </view>
  29. </view>
  30. <view hidden='{{inputValue}}' class="safe_area">
  31. <block wx:if="{{isShowLetter}}">
  32. <view class="showSlectedLetter">
  33. {{showLetter}}
  34. </view>
  35. </block>
  36. <!-- catchtouchstart="searchStart" catchtouchmove="searchMove" catchtouchend="searchEnd" -->
  37. <view class="searchLetter touchClass">
  38. <view wx:for="{{searchLetter}}" style="height:{{itemH}}px" wx:key="index" data-letter="{{item.name}}" bindtap="toView">{{item.name}}</view>
  39. </view>
  40. <scroll-view scroll-y="true" style="height:{{winHeight}}px" bindscroll="bindScroll" scroll-into-view="{{letter}}">
  41. <view class="selection" wx:for="{{cityList}}" wx:key="index" id="{{item.firstNameLetter}}">
  42. <block wx:if="{{index===0}}">
  43. <!-- <view class='panel'>定位城市</view> -->
  44. <view class='location_city'>
  45. <view data-text="{{currcity}}" data-code="{{currcityCode}}">
  46. <text>{{currcity}}</text>
  47. <text class="active">当前定位</text>
  48. </view>
  49. <view class='position' catchtap="cxgps">
  50. <!-- <i-icon type="refresh" /> -->
  51. <text>重新定位</text>
  52. </view>
  53. </view>
  54. <view class='panel' wx:if="{{hotList.length}}">热门城市</view>
  55. <view class='hot_city' wx:if="{{hotList.length}}">
  56. <view class="btn" wx:for="{{hotList}}" wx:key="index" wx:for-index="idx" data-text="{{item.cityName}}" data-code="{{item.cityCode}}" data-index="{{index}}" bindtap="chooseHotCity">{{item.cityName}}</view>
  57. </view>
  58. </block>
  59. <view class="item_letter">{{item.firstNameLetter}}</view>
  60. <view class="item_city" wx:for="{{item.cityInfo}}" wx:for-item="ct" wx:key="index" wx:for-index="idx" data-text="{{ct.cityName}}" data-code='{{ct.cityCode}}' data-index="{{index}}" data-idx="{{idx}}" bindtap="chooseCity">
  61. {{ct.cityName}}
  62. </view>
  63. </view>
  64. </scroll-view>
  65. </view>
  66. <view class='result-list' wx:if="{{inputValue}}" style="margin-top:20px">
  67. <view class="item_city" wx:for="{{searchList}}" wx:key="index" data-text="{{item.cityName}}" data-index="{{index}}" data-code="{{item.cityCode}}" bindtap="chooseSearchCity">{{item.cityName}}</view>
  68. </view>