devicePosition.vue 877 Bytes
<template>
	<view>
		<!-- 公共组件-每个页面必须引入 -->
		<public-module></public-module>
		<map style="width: 100%; min-height: 100vh;" :markers="markers" :scale="scale" :latitude="getPos.latitude" :longitude="getPos.longitude"></map>
	</view>
</template>

<script>
import { mapUrl, mapKay } from '@/config/tcMapConfig.js';

export default {
	components: {},
	data() {
		return {
			getPos: {
				longitude: 0,
				latitude: 0
			},
			scale: 15,
			markers: [
				{
					latitude: 0,
					longitude: 0
				}
			]
		};
	},
	onLoad(e) {
		if (e.data != null) {
			const params = JSON.parse(e.data);
			if (params) this.getPos.longitude = params.longitude;
			this.getPos.latitude = params.latitude;
			this.markers[0].longitude = params.longitude;
			this.markers[0].latitude = params.latitude;
		}
	},
	methods: {}
};
</script>

<style lang="scss" scoped></style>