mapContent.wxml 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <!--pages/jsCase/citySel/index.wxml-->
  2. <wxs module="utils" src="../../../utils/formatFuc.wxs" />
  3. <view class="head {{search&&'r_head'}}">
  4. <!-- 搜索框 -->
  5. <view class="flex-row search-box">
  6. <view class="city-block" bindtap="switchCity">
  7. <view> {{current_city}}</view>
  8. <image class="arrow-img {{cityShow?'arrow-up':''}}" mode="aspectFit"
  9. src='https://mall.zhaijieshi.cc/file/jzmall-dy/arrow-down.png'></image>
  10. </view>
  11. <view class="head_input">
  12. <image src="https://mall.zhaijieshi.cc/file/wx-dy/icon-search.png" class="search_icon"></image>
  13. <input type="text" placeholder="搜索" placeholder-class="place_holder" bindinput="getValue" value="{{search}}"
  14. bindfocus="mapFocus" class="input-view" confirm-type="search" bindconfirm="confSearch"></input>
  15. </view>
  16. <view class="sha_icon" catchtap="clear_input" wx:if="{{(!mapShow)}}">取消</view>
  17. </view>
  18. <view class="flex-row head_curr" wx:if="{{cityShow}}">
  19. <image src="https://mall.zhaijieshi.cc/file/wx-dy/address-map.png" class="h_c_icon" />
  20. <view>当前定位城市: {{current_city}}</view>
  21. </view>
  22. </view>
  23. <scroll-view wx:if="{{cityShow}}" scroll-y="true" class="sy_container" scroll-into-view="{{scrollViewId}}">
  24. <view class="hot_city">
  25. <view class="title">热门城市</view>
  26. <view class="flex-row flex-wrap box">
  27. <block wx:for="{{hot_city}}" wx:key="hot">
  28. <view class="name" hover-class="sel_city" hover-stay-time="150" bindtap="cityTap" data-city="{{item.name}}">
  29. {{item.name}}</view>
  30. </block>
  31. </view>
  32. </view>
  33. <view class="all_city">
  34. <view wx:for="{{city_list}}" wx:key="city_list" wx:if="{{item.data.length>0}}">
  35. <view class="letter_name" id="{{item.letter}}">{{item.letter}}</view>
  36. <view class="city">
  37. <block wx:for="{{item.data}}" wx:key="data" wx:for-index="index0" wx:for-item="item0">
  38. <view class="name flex-row" hover-class="city_hover" hover-stay-time='150' bindtap="cityTap"
  39. data-city="{{item0.cityName}}">{{item0.cityName}}</view>
  40. </block>
  41. </view>
  42. </view>
  43. </view>
  44. </scroll-view>
  45. <!-- 侧边选择索引 -->
  46. <view wx:if="{{cityShow}}">
  47. <view class="fixed_bar" style="height: {{barHeight}}px;" catchtouchstart="touchStart" catchtouchmove="touchMove"
  48. catchtouchend="touchEnd" catchtouchcancel="touchCancel">
  49. <view wx:for="{{city_list}}" wx:key="index" style="height: {{barHeight/22}}px;">
  50. <view class="bar_item flex-column j_c {{curr==index&&'bar_item_active'}}"
  51. style="width: {{barHeight/22*0.75}}px;height: {{barHeight/22*0.75}}px;">{{item.letter}}</view>
  52. </view>
  53. </view>
  54. <view wx:if="{{showLetter &&city_list[curr].letter}}" class="fixed_letter">{{city_list[curr].letter}}</view>
  55. </view>
  56. <view wx:if="{{resultShow}}" class="result_list">
  57. <view wx:if="{{result.length>0}}">
  58. <block wx:for="{{result}}" wx:key="result">
  59. <view class="r_item" hover-stay-time='150' hover-class="r_item_hover" bindtap="resultTap"
  60. data-location="{{item.location}}" data-name="{{item.name}}">
  61. <view>{{item.name}}</view>
  62. <view>{{item.district+item.address}}</view>
  63. </view>
  64. </block>
  65. </view>
  66. <view wx:else class="flex-column no_data">
  67. <image src="https://mall.zhaijieshi.cc/file/jzmall-dy/no-data.png" />
  68. <view>未搜到相关地址</view>
  69. <view>输入地址后请点击搜索</view>
  70. </view>
  71. </view>
  72. <!-- tt-if="{{mapShow}}" -->
  73. <map enable-rotate="{{true}}" min-scale="{{3}}" max-scale="{{19}}" id="myMap"
  74. enable-scroll="{{true}}" enable-overlooking="{{true}}" longitude="{{lng}}" bindtap="mapTap" show-location="{{true}}"
  75. latitude="{{lat}}" scale="{{15}}" bindregionchange="regionChange" enable-zoom="{{true}}" bindupdated="mapUpdated">
  76. </map>
  77. <view class="marker-name" wx:if="{{mapShow&&currentName&&currentName.length>0}}">{{currentName}}</view>
  78. <image src="https://mall.zhaijieshi.cc/file/jzmall-dy/icon-marker.png" class="map-icon" wx:if="{{mapShow}}"></image>
  79. <scroll-view class="poi-list" scroll-y="{{true}}" wx:if="{{mapShow}}">
  80. <view class="poi-item" wx:for="{{poiList}}" wx:key="index" bindtap="poiTap" data-poi="{{item}}">
  81. <view class="poi-left">
  82. <view class="poi-name">{{item.name}}</view>
  83. <view class="poi-address">{{item.address}}</view>
  84. </view>
  85. <view class="poi-right">{{utils.formatDistance(item.distance)}}米</view>
  86. </view>
  87. </scroll-view>