赞
踩
<view @click="getLocation">选择地址</view>
getLocation(){
uni.chooseLocation({
success: (res) => {
console.log(res);
this.address = res.address
this.longitude = res.longitude
this.latitude = res.latitude
}
});
},
const address = ref('')
const longitude = ref('')
const latitude = ref('')
function chooseAddress() {
uni.chooseLocation({
success: (res) => {
console.log(res);
address.value = res.address
longitude.value = res.longitude
latitude.value = res.latitude
}
})
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。