You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
522 B
25 lines
522 B
<template>
|
|
<view>
|
|
<button @tap="handleSelectLocation">选择位置</button>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {};
|
|
},
|
|
methods: {
|
|
handleSelectLocation() {
|
|
uni.chooseLocation({
|
|
success: function(res) {
|
|
console.log('位置名称:' + res.name);
|
|
console.log('详细地址:' + res.address);
|
|
console.log('纬度:' + res.latitude);
|
|
console.log('经度:' + res.longitude);
|
|
},
|
|
});
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|