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.
40 lines
696 B
40 lines
696 B
<template>
|
|
<view class="map">
|
|
<image v-if="isShow" @click="toClick()" src="@/static/lvyou/zijia-map.png"></image>
|
|
<map style="width: 100%; height: 100vh;" v-else :latitude="latitude" :longitude="longitude"></map>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
latitude: "",
|
|
longitude: "",
|
|
isShow: true
|
|
};
|
|
},
|
|
methods: {
|
|
toClick() {
|
|
const that = this;
|
|
uni.getLocation({
|
|
success(res) {
|
|
that.isShow = false;
|
|
that.latitude = res.latitude;
|
|
that.longitude = res.longitude;
|
|
}
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.map{
|
|
image{
|
|
width: 750rpx;
|
|
height: 1393rpx;
|
|
display: block;
|
|
}
|
|
}
|
|
</style>
|
|
|