<template>
  <div>
    <tab-nav active="4"></tab-nav>
    <div id="allmap"></div>
    <div class="main-container">
      <div class="main-content">
        <h1 class="title">联系我们</h1>
        <p>地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址：北京市海淀区中关村东路1号院7号楼5层</p>
        <p>联系电话：010-62793299</p>
        <p>邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱：service@ezijing.com</p>
      </div>
      <div class="main-content">
        <h1 class="title">关注我们</h1>
        <ul class="follow">
          <li>
            <img src="https://zws-imgs-pub.ezijing.com/static/public/5c4a58f1d41f786e7713a5a84069404d.png" />
            <div class="name">紫荆企业微信</div>
          </li>
          <li>
            <img src="https://zws-imgs-pub.ezijing.com/static/public/b4de41c51c1a897ee4bca574d7bf0d50.png" />
            <div class="name">紫荆官方微博</div>
          </li>
          <li>
            <img src="https://zws-imgs-pub.ezijing.com/static/public/85fb47e859d152f1021bc6b94154ce91.png" />
            <div class="name">紫荆官方抖音</div>
          </li>
          <li>
            <img src="https://zws-imgs-pub.ezijing.com/static/public/e2ffbf6b9d7fd6fd66d2487e7c33540c.png" />
            <div class="name">紫荆小鹅通</div>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
import TabNav from '@/components/about/TabNav'
export default {
  props: { acitve: String },
  components: { TabNav },
  mounted() {
    if (process.browser) {
      !(function (mapInit) {
        var script = document.createElement('script')
        script.type = 'text/javascript'
        script.src = 'https://api.map.baidu.com/api?v=2.0&ak=Z9Km7UTGFI2fwRrpGp7Mji4ySDsvn30d&callback=mapinit'
        window['mapinit'] = function () {
          mapInit()
        }
        document.head.appendChild(script)
      })(function () {
        // 这里使用BMap
        var map = new BMap.Map('allmap')
        map.centerAndZoom(new BMap.Point(116.336323, 39.998848), 20)
        map.enableScrollWheelZoom(true)
        // 创建点标记
        var marker1 = new BMap.Marker(new BMap.Point(116.336323, 39.998848))
        map.addOverlay(marker1)
      })
    }
  }
}
</script>

<style lang="scss" scoped>
#allmap {
  height: 1.2rem;
}
.follow {
  display: flex;
  justify-content: space-between;
  li {
    width: 0.65rem;
    img {
      display: block;
      width: 100%;
    }
    .name {
      margin-top: 0.09rem;
      font-size: 0.1rem;
      text-align: center;
      color: #666;
    }
  }
}
</style>
