<template>
  <div class="foot-mian">
    <div class="foot-box">
      <div class="foot-content">
        <div class="left-content">
          <div class="link">
            <a href="http://jsj.moe.gov.cn" target="_blank">
              {{ $t('foot.link1') }}
            </a>
          </div>
          <!-- <div>
            <a href="http://www.pbcsf.tsinghua.edu.cn" target="_blank"> {{ $t('foot.link2') }} </a>
          </div> -->
          <!-- <div>
            合作大学官网
          </div> -->
          <div :class="$cookies.get('lang') == 'en-US' ? 'center-content f-size' : 'center-content'">
            <div class="address" v-html="$t('foot.address')"></div>
            <div class="phone" v-html="$t('foot.contact')"></div>
            <div class="mail" v-html="$t('foot.email')"></div>
          </div>
        </div>
        <div class="right-content">
          <img src="https://webapp-pub.ezijing.com/project/marywood/ezijing-code.jpg" class="code" />
          <div class="tips-txt">
            <img src="https://zws-imgs-pub.ezijing.com/static/public/184235d9f6edbb39d52fc6f77339ff5b.png" />
            <div class="txt">{{ $t('foot.weChat') }}</div>
          </div>
        </div>
        <div class="right-content">
          <img src="https://webapp-pub.ezijing.com/project/marywood/ezijing_xet_x.png" class="code" />
          <div class="tips-txt">
            <img src="https://webapp-pub.ezijing.com/www/pc/icon_gongkaike.png" />
            <div class="txt">{{ $t('foot.ezjClass') }}</div>
          </div>
        </div>
      </div>
      <div class="links" v-html="$t('foot.relation')"></div>
    </div>
    <div class="copyright">
      <div class="inner">
        <p>
          {{
            $cookies.get('lang') == 'en-US'
              ? `Copyright © 2017 Zijing Education. All rights reserved.`
              : `Copyright © 2017 Zijing Education. All rights reserved. 清控紫荆（北京）教育科技股份有限公司`
          }}
        </p>
        <a target="_blank" href="https://tsm.miit.gov.cn/dxxzsp/" style="color: rgba(153, 153, 153, 1); text-decoration: none; margin-left: 10px">
          <p>
            {{ $cookies.get('lang') == 'en-US' ? 'Beijing ICP Certificate No.: 150431 ' : '京ICP证150431号' }}
          </p>
        </a>
        <a
          target="_blank"
          class="record"
          href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802023681"
          style="color: rgba(153, 153, 153, 1); text-decoration: none; align-items: center; display: flex; margin-right: 5px">
          <img src="https://zws-imgs-pub.ezijing.com/e0a0ec47dfdfc1e0797b1d5254021d00.png" style="width: 20px; height: 20px; margin: 0 6px; display: block" />
          <p>
            {{ $cookies.get('lang') == 'en-US' ? `Beijing ICP Filing No.: 15016866-1` : '安备 11010802023681号' }}
          </p>
        </a>
        <a target="_blank" href="https://beian.miit.gov.cn/#/Integrated/index" style="color: rgba(153, 153, 153, 1); text-decoration: none">
          <p>
            {{ $cookies.get('lang') == 'en-US' ? icpNumberEn : icpNumber }}
          </p>
        </a>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  computed: {
    icpNumber() {
      const map = [
        { icp: '京ICP备15016866号-4', host: 'seg-aisa.cn' },
        { icp: '京ICP备15016866号-5', host: 'segedu.cn' },
        { icp: '京ICP备15016866号-6', host: 'segcdc.cn' },
        { icp: '京ICP备15016866号-7', host: 'segcdc.com' },
        { icp: '京ICP备15016866号-8', host: 'segshms.cn' },
        { icp: '京ICP备15016866号-9', host: 'segshms.com' },
        { icp: '京ICP备15016866号-10', host: 'segcrcs.com' },
        { icp: '京ICP备15016866号-11', host: 'segcrcs.cn' },
        { icp: '京ICP备15016866号-12', host: 'seghim.cn' },
        { icp: '京ICP备15016866号-13', host: 'seghim.com' },
        { icp: '京ICP备15016866号-14', host: 'seg-aisa.com' },
        { icp: '京ICP备15016866号-1', host: 'ezijing.com' }
      ]
      const found = map.find(item => {
        return process.browser && location.hostname.includes(item.host)
      })
      return found ? found.icp : '京ICP备15016866号-1'
    },
    icpNumberEn() {
      const map = [
        { icp: 'Beijing ICP Filing No.: 15016866-4', host: 'seg-aisa.cn' },
        { icp: 'Beijing ICP Filing No.: 15016866-5', host: 'segedu.cn' },
        { icp: 'Beijing ICP Filing No.: 15016866-6', host: 'segcdc.cn' },
        { icp: 'Beijing ICP Filing No.: 15016866-7', host: 'segcdc.com' },
        { icp: 'Beijing ICP Filing No.: 15016866-8', host: 'segshms.cn' },
        { icp: 'Beijing ICP Filing No.: 15016866-9', host: 'segshms.com' },
        { icp: 'Beijing ICP Filing No.: 15016866-10', host: 'segcrcs.com' },
        { icp: 'Beijing ICP Filing No.: 15016866-11', host: 'segcrcs.cn' },
        { icp: 'Beijing ICP Filing No.: 15016866-12', host: 'seghim.cn' },
        { icp: 'Beijing ICP Filing No.: 15016866-13', host: 'seghim.com' },
        { icp: 'Beijing ICP Filing No.: 15016866-14', host: 'seg-aisa.com' },
        { icp: 'Beijing ICP Filing No.: 15016866-1', host: 'ezijing.com' }
      ]
      const found = map.find(item => {
        return process.browser && location.hostname.includes(item.host)
      })
      return found ? found.icp : 'Beijing ICP Filing No.: 15016866-1'
    }
  }
}
</script>
<style lang="scss" scoped>
.foot-mian {
  width: 100%;
  min-width: 1200px;
  background: rgba(170, 25, 65, 1);
  .links {
    padding-top: 12px;
    font-size: 14px;
    font-weight: 300;
    line-height: 24px;
    color: #ffffff;
    opacity: 0.6;
    width: 1200px;
    margin: 0 auto;
  }
  .foot-box {
    padding: 80px 0 35px;
    width: 1200px;
    margin: 0 auto;
  }
  .foot-content {
    // height: 300px;
    display: flex;
    .left-content {
      flex: 1;
      .link {
        opacity: 0.7;
        font-size: 18px;
        font-weight: 300;
        // line-height: 30px;
        color: #ffffff;
        text-decoration: underline;
        letter-spacing: 3px;
      }
    }
    .center-content {
      margin-top: 30px;
      font-size: 18px;
      line-height: 32px;
      color: #ffffff;
      letter-spacing: 4px;
      opacity: 0.7;

      &.f-size {
        font-size: 16px;
      }
    }
    .right-content {
      margin-left: 30px;
      .code {
        width: 120px;
        display: block;
      }
      .tips-txt {
        padding-top: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        img {
          width: 21px;
          display: block;
        }
        .txt {
          font-size: 14px;
          color: #ffffff;
          margin-left: 7px;
        }
      }
    }
  }
}
.copyright {
  height: 40px;
  color: rgba(153, 153, 153, 1) !important;
  background: #fff;
  display: flex;
  align-items: center;
  .inner {
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
  }
  .record {
    display: flex;
  }
  p {
    font-size: 12px;
  }
}
</style>
