//获取地理位置
getLocation() {
uni.getLocation({
type: 'gcj02',
success: (res)=> {
this.formData.latitude = res.latitude
this.formData.longitude = res.longitude
console.log(res)
},
fail: ()=> {
uni.showToast({
title: '获取地址失败,将导致部分功能不可用',
icon: 'none'
});
}
});
},
3***@qq.com
- 发布:2021-09-22 19:14
- 更新:2021-09-22 19:14
- 阅读:595
0 个回复