在index/index页面onReady中调用getLocation
onReady() {
uni.getLocation({
type: 'gcj02',
altitude: true,
geocode: true,
isHighAccuracy: true,
success: function (res) {
console.log(res);
},
fail: function (res) {
console.log(res);
},
complete: function (res) {
console.log(res);
},
});
}
1 个回复
dgex (作者) - dgex
已解决 转换问题