switchcity.wxml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <view class="input">
  2. <input bindinput="bindKeyInput" bindblur="bindBlur" placeholder="输入城市名或拼音查询" placeholder-style="font-size: 30rpx" value="{{inputName}}"></input>
  3. </view>
  4. <view class="container">
  5. <view class="searchLetter touchClass">
  6. <view class="thishotText" bindtap="hotCity">
  7. <view style="margin-top:0;">当前</view>
  8. <view style="margin-top:0;">热门</view>
  9. </view>
  10. <view wx:for="{{searchLetter}}" style="color:#2ab4ff;font-size:20rpx;" wx:key="index" data-letter="{{item.name}}" catchtouchend="clickLetter" >{{item.name}}</view>
  11. </view>
  12. <block wx:if="{{isShowLetter}}">
  13. <view class="showSlectedLetter">
  14. {{toastShowLetter}}
  15. </view>
  16. </block>
  17. <scroll-view scroll-y="true" style="height:{{winHeight}}px" bindscroll="bindScroll"
  18. scroll-into-view="{{scrollTopId}}" scroll-top="{{scrollTop}}">
  19. <ul wx:for="{{completeList}}" wx:key="index" class="ul">
  20. <li bindtap="bindCity" data-city="{{item.city}}" data-code="{{item.code}}" class="li">{{item.city}}</li>
  21. </ul>
  22. <view class="hotcity-common">选择区县:{{county}}</view>
  23. <view class="weui-grids">
  24. <block class="hotCity" wx:for-items="{{countyList}}" wx:key="{{index}}">
  25. <view class="weui-grid" data-code="{{item.id}}" data-city="{{item.fullname}}" bindtap="bindCounty" >
  26. <view class="weui-grid__label">{{item.fullname}}</view>
  27. </view>
  28. </block>
  29. </view>
  30. <view class="selectCity">
  31. <view class="hotcity-common" bindtap="getLocation">重新定位城市</view>
  32. <view class="thisCityName">{{city}}</view>
  33. <!-- <view class="hotcity-common">最常访问</view>
  34. <view class="weui-grids">
  35. <block class="hotCity" wx:for-items="{{commonCityList}}" wx:key="{{index}}">
  36. <view class="weui-grid" data-code="{{item.cityCode}}" data-city="{{item.city}}" bindtap="bindCity" >
  37. <view class="weui-grid__label">{{item.city}}</view>
  38. </view>
  39. </block>
  40. </view> -->
  41. <view class="hotcity-common">热门城市</view>
  42. <view class="weui-grids">
  43. <block class="hotCity" wx:for-items="{{hotcityList}}" wx:key="{{index}}">
  44. <view class="weui-grid" data-code="{{item.cityCode}}" data-city="{{item.city}}" bindtap="bindCity" >
  45. <view class="weui-grid__label">{{item.city}}</view>
  46. </view>
  47. </block>
  48. </view>
  49. </view>
  50. <view class="selection" wx:for="{{cityList}}" wx:key="{{item.initial}}">
  51. <view class="item_letter" id="{{item.initial}}">{{item.initial}}</view>
  52. <view class="item_city" wx:for="{{item.cityInfo}}" wx:for-item="ct" wx:key="{{ct.id}}" data-code="{{ct.code}}" data-city="{{ct.city}}" bindtap="bindCity">
  53. {{ct.city}}
  54. </view>
  55. </view>
  56. </scroll-view>
  57. </view>