<template>
  <div>
    <tab-nav active="4"></tab-nav>
    <div id="allmap"></div>
    <div class="main-container">
      <div class="main-content">
        <h1 class="title">{{ $t('about.contact.lxTit') }}</h1>
        <p v-html="$t('about.contact.contactTxt')"></p>
      </div>
      <div class="main-content">
        <h1 class="title">{{ $t('about.contact.follow') }}</h1>
        <ul class="follow">
          <li>
            <img src="https://zws-imgs-pub.ezijing.com/static/public/5c4a58f1d41f786e7713a5a84069404d.png" />
            <div class="name">{{ $t('about.contact.followCodeT1') }}</div>
          </li>
          <li>
            <img src="https://webapp-pub.ezijing.com/project/marywood/wb-code.png" />
            <div class="name">{{ $t('about.contact.followCodeT2') }}</div>
          </li>
          <li>
            <img src="https://webapp-pub.ezijing.com/project/marywood/douyin-code.png" />
            <div class="name">{{ $t('about.contact.followCodeT3') }}</div>
          </li>
          <li>
            <img src="https://webapp-pub.ezijing.com/project/marywood/xiaoet-code.png" />
            <div class="name">{{ $t('about.contact.followCodeT4') }}</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;
    overflow: hidden;
    text-align: center;
    img {
      display: block;
      width: 0.65rem;
      height: 0.65rem;
      object-fit: contain;
      background-color: #fff;
    }
    .name {
      margin-top: 0.09rem;
      font-size: 0.1rem;
      text-align: center;
      color: #666;
    }
  }
}
</style>
