<template>
  <div class="news">
    <Banner :img="require('@/assets/img/contact.png')" />
    <div class="common-container">
      <el-container>
        <el-card>
          <div class="flex">
            <ul class="contact-list">
              <li>
                <img src="../assets/img/contact-1.png"
                     alt="">
                <div class="text">
                  <p>地址</p>
                  <span>贵州省遵义市汇川区大连路149号</span>
                </div>
              </li>
              <li>
                <img src="../assets/img/contact-2.png"
                     alt="">
                <div class="text">
                  <p>电话</p>
                  <span>(0851)-28608418</span>
                </div>
              </li>
              <li>
                <img src="../assets/img/contact-3.png"
                     alt="">
                <div class="text">
                  <p>邮箱</p>
                  <span>123456@ujs.edu.cn</span>
                </div>
              </li>
              <li>
                <img src="../assets/img/contact-4.png"
                     alt="">
                <div class="text">
                  <p>办公地址</p>
                  <span>科研楼4层402</span>
                </div>
              </li>
            </ul>
            <div id="container"></div>
          </div>
        </el-card>
      </el-container>
    </div>
  </div>
</template>

<script>
import Banner from "../components/Banner";
export default {
  name: "ContactUs",
  components: {
    Banner,
  },
  data() {
    return {};
  },
  mounted() {
    this.initMap();
  },
  methods: {
    initMap() {
      var map = new BMapGL.Map("container"); // 创建Map实例
      map.centerAndZoom(new BMapGL.Point(106.951933, 27.713082), 18); // 初始化地图,设置中心点坐标和地图级别
      var marker1 = new BMapGL.Marker(new BMapGL.Point(106.951933, 27.713082));
      map.disableDoubleClickZoom()
      // map.enableScrollWheelZoom(false); // 开启鼠标滚轮缩放
      map.disableDragging()
      map.addOverlay(marker1);
    },
  },
};
</script>

<style lang="scss" scoped>
.el-card {
  flex: 1;
  #container {
    width: 700px;
    height: 500px;
  }
  .contact-list {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    list-style: none;
    flex: 1;
    padding: 60px 0 60px 60px;
    li {
      display: flex;
      align-items: center;
      img {
        height: 48px;
        width: 48px;
      }
      .text {
        margin-left: 12px;
        p {
          font-weight: bold;
          font-size: 18px;
          color: #323232;
          margin-bottom: 4px;
        }
        span {
          font-weight: 400;
          font-size: 16px;
          color: #656565;
        }
      }
    }
  }
}
</style>