<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>
