uni.getLocation({
type: 'wgs84',
success: function(res) {
this.distance='当前位置的经度:' + res.longitude+' 当前位置的纬度:' + res.latitude;
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
},
fail:function(res){
console.log(res);
}
});
![Bocheng](https://img-cdn-tc.dcloud.net.cn/account/identicon/5070f91fec02deb3649437a4c928e5d9.png)
Bocheng
- 发布:2019-06-28 16:29
- 更新:2019-09-06 15:59
- 阅读:1957
![](http://img-cdn-tc.dcloud.net.cn/uploads/questions/20190628/61d1b2d83a466df05c4acbc71087349b.png)