<template>
	<div class="center">
		<div class="title">联系我们</div>
		<div class="box">
			<baidu-map class="bm-view" @ready="init" :min-zoom="5" :max-zoom="18">
				<bm-info-window
					:position="{ lng: 121.389408, lat: 28.595935 }"
					:show="infoWindow.show"
					@close="infoWindowClose"
					@open="infoWindowOpen"
				>
					<p class="font-title">添利节能科技</p>
					<p class="font-main">地址：浙江省台州市路桥区路北街道珠光街199号213室</p>
					<p class="font-main">联系方式：0576-82528889</p>
					
				</bm-info-window>
			</baidu-map>
		</div>
		<div class="phone">
			咨询热线：0576-82528889
		</div>
	</div>
</template>

<script>
export default {
	data() {
		return {
			text: '',
			map: null, //保存地图
			// 默认层级
			zoomActive: 18,
			infoWindow: {
				show: true,
				
			}
		};
	},
	created() {
		this.getContent();
	},
	methods: {
		getContent() {},
		init({ BMap, map }) {
			this.map = map;
			// 初始化地图,设置中心点坐标
			var point = new BMap.Point(121.389408, 28.595935);
			map.centerAndZoom(point, this.zoomActive);
			// this.setMarker();
			// 添加鼠标滚动缩放
			map.enableScrollWheelZoom();
		},
		infoWindowClose(e) {
			this.infoWindow.show = false;
		},
		infoWindowOpen(e) {
			this.infoWindow.show = true;
		}
	}
};
</script>

<style lang="scss" scoped="">
.title {
	padding-bottom: 20px;
	font-size: 20px;
	font-weight: bold;
}
.box {
	width: 850px;
	height: 400px;
	.bm-view {
		width: 100%;
		height: 100%;
	}
}
.font-title {
	padding-top: 5px;
	padding-right: 5px;
	font-size: 16px;
}
.font-main {
	font-size: 14px;
}
.phone {
	margin-top: 40px;
	width: 850px;
	text-align: center;
}
</style>
