XWookey 3 years ago
parent
commit
bdc281c897
2 changed files with 19 additions and 1 deletions
  1. 5 0
      pages/index/index.wxml
  2. 14 1
      pages/index/index.wxss

+ 5 - 0
pages/index/index.wxml

@@ -19,6 +19,11 @@
       <text style='color:#969696;'>{{textData.slowCharg==null?0:textData.slowCharg}}</text>
     </view>
     <map class="map" id="map" longitude="{{longitude}}" latitude="{{latitude}}" scale="16" show-location="true" markers="{{markers}}" bindmarkertap="makertap" bindregionchange="mapchange" polygon="{{polygon}}">
+      <view class='map_distance'>
+        <picker class="picker" bindchange="bindDistanceinfoChange" value="{{distanceinfoindex}}" range-key="text" range="{{distanceinfo}}">
+          <text>距离{{distanceinfo[distanceinfoindex].text}}</text>
+        </picker>
+      </view>
       <cover-view class='map_location' bindtap='click_location_control' hover-class='map_location_hover'>
         <cover-image class='circle1' src='/images/circle1.png'></cover-image>
       </cover-view>

+ 14 - 1
pages/index/index.wxss

@@ -275,7 +275,20 @@ text.price {
   color: #9d9d9d;
 }
 
-
+.picker{
+  text-align: right;
+  position: absolute;
+  left: 30rpx;
+  top: 30rpx;
+  
+}
+.picker text{
+  color: #545253;
+  margin: 0;
+  padding: 4rpx 10rpx 4rpx 10rpx;
+  border:solid 2rpx #545253;
+  border-radius: 8rpx;
+}
 
 /* 通知相关 begin */
 .modal_box {