|
@@ -524,7 +524,7 @@
|
|
|
this.userId = this.carhelp.getPersonInfo().id;
|
|
|
|
|
|
}
|
|
|
- WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
|
|
|
+ WxJsApi.getWxConfig(['getLocation','openLocation', 'addEventListener', 'scanQRCode']).then((res) => {
|
|
|
// //(res)
|
|
|
}).catch(error => {
|
|
|
//(res)
|
|
@@ -801,17 +801,26 @@
|
|
|
},
|
|
|
|
|
|
|
|
|
- navigate() {
|
|
|
- /*wx.openLocation({
|
|
|
- latitude: _self.station.latitude,//目的地latitude
|
|
|
- longitude: _self.station.longitude,//目的地longitude
|
|
|
- name: _self.station.name,
|
|
|
- address: _self.station.address,
|
|
|
- scale: 15//地图缩放大小,可根据情况具体调整
|
|
|
- });*/
|
|
|
- //('station'+JSON.stringify(_self.stationDetail.station))
|
|
|
- window.location.href = "https://uri.amap.com/marker?position=" + _self.stationDetail.station.longitude +
|
|
|
- "," + _self.stationDetail.station.latitude + "&name=" + _self.stationDetail.station.name;
|
|
|
+ navigate() {
|
|
|
+ uni.showLoading({
|
|
|
+
|
|
|
+ })
|
|
|
+ WxJsApi.openLocation({
|
|
|
+ latitude:parseFloat( _self.stationDetail.station.latitude),//目的地latitude
|
|
|
+ longitude:parseFloat( _self.stationDetail.station.longitude),//目的地longitude
|
|
|
+ name: _self.stationDetail.station.name,
|
|
|
+ address: _self.stationDetail.station.address,
|
|
|
+ scale: 15,//地图缩放大小,可根据情况具体调整
|
|
|
+ success(res) {
|
|
|
+ uni.hideLoading()
|
|
|
+ },
|
|
|
+ complete() {
|
|
|
+ // uni.hideLoading()
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // //('station'+JSON.stringify(_self.stationDetail.station))
|
|
|
+ // window.location.href = "https://uri.amap.com/marker?position=" + _self.stationDetail.station.longitude +
|
|
|
+ // "," + _self.stationDetail.station.latitude + "&name=" + _self.stationDetail.station.name;
|
|
|
|
|
|
},
|
|
|
charge() {
|
|
@@ -840,9 +849,10 @@
|
|
|
id
|
|
|
})
|
|
|
},
|
|
|
- map() {
|
|
|
- var item= _self.stationDetail.station
|
|
|
- window.location.href="https://uri.amap.com/marker?position="+ item.longitude+","+item.latitude+"&name="+item.name;
|
|
|
+ map() {
|
|
|
+ this.navigate()
|
|
|
+ //var item= _self.stationDetail.station
|
|
|
+ //window.location.href="https://uri.amap.com/marker?position="+ item.longitude+","+item.latitude+"&name="+item.name;
|
|
|
|
|
|
// //('map'+JSON.stringify(_self.station))
|
|
|
// _self.station.address = 'xxxxxxxxxxxxx'
|