xyg 2 жил өмнө
parent
commit
274ec343bc

+ 14 - 9
nnzwminiapp/pages/map/map.js

@@ -62,8 +62,6 @@ Page({
     searchVal: '',
     trafficStart: '',
     trafficEnd: '',
-    navigateArr: ['百度地图导航', '高德地图导航'],
-    showSection: true,
     index: 0,
     isList:true,
     showSet:false
@@ -122,6 +120,10 @@ Page({
   },
   changeInfo(e){
     console.log(e.currentTarget.dataset.name);
+    this.setData({
+        showTraffic: false,
+        showIndex: false
+    });
   },
   // 电话拨打
   callNumber(e){
@@ -180,20 +182,23 @@ Page({
         let trafficStart = this.data.trafficStart;
         let trafficEnd = this.data.trafficEnd;
         if (!trafficStart || !trafficEnd) {
-            that.setData({
-                showSection: true
-            });
             wx.showToast({
                 title: '请输入起点和终点',
                 icon: 'none'
             });
             return;
-        } else {
-            that.setData({
-                showSection: false
-            });
         }
         console.info(trafficStart, trafficEnd);
+        wx.showActionSheet({
+            showCancel: true,
+            itemList: ['百度地图导航', '高德地图导航'],
+            success: function (res) {
+                console.info(res);
+            },
+            fail: function (e) {
+                console.info(e);
+            }
+        });
     },
 
     bindPickerChange(e){

+ 1 - 9
nnzwminiapp/pages/map/quert.wxml

@@ -16,15 +16,7 @@
       <input class="go_input" placeholder="请输入终点" value="{{trafficEnd}}" bindinput="getTrafficEnd" />
     </view>
   </view>
-  <!-- <view><image src="{{imgUrl}}/ss3.png" class="inp-icon1" bindtap="searchTrafficTap"></image></view> -->
- 
-    <view class="section">
-        <picker mode="selector" bindchange="bindPickerChange" value="{{index}}" range="{{navigateArr}}" disabled="{{showSection}}">
-            <view class="picker">
-                <image src="{{imgUrl}}/ss3.png" class="inp-icon1" bindtap="searchTrafficTap"></image>
-            </view>
-        </picker>
-    </view>
+  <view><image src="{{imgUrl}}/ss3.png" class="inp-icon1" bindtap="searchTrafficTap"></image></view>
 
 </view>