zhupeng 3 سال پیش
والد
کامیت
c774d20b85
1فایلهای تغییر یافته به همراه22 افزوده شده و 1 حذف شده
  1. 22 1
      pages/searchPile/stationAndPile/stationDetailsMap.vue

+ 22 - 1
pages/searchPile/stationAndPile/stationDetailsMap.vue

@@ -53,7 +53,7 @@
 				 		<u-button shape='circle' style="color: #00B962;" @click="getScanCode">
 				 			<u-icon name="scan" size="26" color="#00B962" style="margin-right: 20rpx;"></u-icon>
 				 			<label>扫码充电</label></u-button>
-				 		<view class="round">
+				 		<view class="round" @click.stop="navigateTo(item)">
 				 			<text class="iconfont distance-font">&#xe615;</text>
 				 			<view  style="margin-right: 10rpx;">
 								{{item.distance!=null&&item.distance>0.1 ? item.distance.toFixed(1)+'公里':'小于100米'}}												
@@ -220,6 +220,27 @@
 					})
 				}
 			},
+			navigateTo(item){
+				/*
+				this.elderMode = !this.elderMode;
+				if(this.elderMode)
+					this.theme('elder')
+				else
+					this.theme('standard')
+				return;
+				*/
+				//this.guide('gd',item);
+				//console.log('导航'+JSON.stringify(item))
+				window.location.href="https://uri.amap.com/marker?position="+ item.longitude+","+item.latitude+"&name="+item.name;
+				
+				//Map.getRoute(item);
+				//Map.openMap(this.latitude, this.longitude, this.name, 'wgs84')
+				 //var startLngLat = [this.longitude, this.latitude]
+				 //var endLngLat = [item.longitude, item.latitude]
+				 ///let platform = uni.getSystemInfoSync().platform
+				 //console.log('platform'+JSON.stringify(platform))
+				 //this.$refs.amap.navigate(startLngLat,endLngLat);
+			},
 			mapdown() { 
 				let data = {stationId:this.id};