<template>
  <div class="app-footer">
    <div class="app-footer-main">
      <div class="inner">
        <div class="left">
          <img src="https://zws-imgs-pub.ezijing.com/static/ezijing/logo/seg-him-logo.png" class="logo" />
          <ul class="menu">
            <li v-for="item in menuList" :key="item.href">
              <a :href="item.href" target="_blank">{{ item.title }}</a>
            </li>
          </ul>
        </div>
        <div class="right">
          <div class="contact">
            <h3>联系我们</h3>
            <p>
              Swiss Education Group<br />
              HIM瑞士蒙特勒酒店工商管理大学<br />
              <!-- 电话：010-62793909<br />
              E-mail：chinafflg@ezijing.com<br /> -->
              地址：北京市海淀区中关村东路1号院7号楼5层<br />
              邮编：100000
            </p>
          </div>
          <div class="qrcode">
            <img src="https://zws-imgs-pub.ezijing.com/static/public/29ce10d35376f24ae1ecaccd57215d5c.jpg" alt="" />
            <p>扫二维码关注官方微信</p>
            <p>微信公众号zijingedu</p>
          </div>
        </div>
      </div>
    </div>
    <div class="copyright" style="height: 40px; line-height: 40px; color: #fff; background: #ccc">
      <div class="inner" style="width: 100%; justify-content: center; display: flex">
        <p style="font-size: 12px">
          Copyright © 2017 Zijing Education. All rights reserved. 清控紫荆（北京）教育科技股份有限公司
        </p>
        <a
          target="_blank"
          href="https://tsm.miit.gov.cn/dxxzsp/"
          style="color: #fff; text-decoration: none; margin-left: 10px"
        >
          <p style="font-size: 12px">京ICP证150431号</p>
        </a>
        <a
          target="_blank"
          class="record"
          href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802023681"
          style="color: #fff; text-decoration: none; align-items: center; display: flex; margin-right: 5px"
        >
          <img
            src="https://zws-imgs-pub.ezijing.com/e0a0ec47dfdfc1e0797b1d5254021d00.png"
            alt=""
            style="width: 20px; height: 20px; margin: 0 6px; display: block"
          />
          <p style="font-size: 12px">安备 11010802023681号</p>
        </a>
        <a
          target="_blank"
          href="https://beian.miit.gov.cn/#/Integrated/index"
          style="color: #fff; text-decoration: none"
        >
          <p style="font-size: 12px">{{ icpNumber }}</p>
        </a>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      menuList: [
        { title: '中国教育部', href: 'http://www.moe.gov.cn/' },
        { title: '中国涉外教育监管网', href: 'http://jsj.moe.gov.cn/' },
        { title: 'HIM瑞士蒙特勒酒店工商管理大学', href: 'www.shms.com' },
        { title: 'Swiss Education Group ', href: 'www.swisseducation.com' }
      ]
    }
  },
  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 window.location.hostname.includes(item.host)
      })
      return found ? found.icp : '京ICP备15016866号-1'
    }
  }
}
</script>

<style lang="scss" scoped>
.logo {
  width: 60px;
}
.app-footer {
  .inner {
    max-width: 970px;
    margin: 0 auto;
  }
  .app-footer-main {
    padding: 40px 0;
    color: #a7a7a7;
    background-color: #212223;
    .inner {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
  }
  .menu {
    margin-top: 10px;
    line-height: 30px;
    font-size: 12px;
    color: #7d7d7d;
  }
  .right {
    display: flex;
  }
  .contact {
    h3 {
      font-size: 16px;
      color: #fff;
      line-height: 1;
      margin-bottom: 15px;
    }
    p {
      font-size: 12px;
      color: #a7a7a7;
      line-height: 24px;
    }
  }
  .qrcode {
    width: 128px;
    margin-left: 80px;
    opacity: 0;
    img {
      width: 100%;
    }
    p {
      font-size: 12px;
      color: #a7a7a7;
      text-align: center;
      line-height: 20px;
    }
  }
  .copyright {
    height: 40px;
    line-height: 40px;
    color: #fff;
    background: #ccc;
    .inner {
      width: 100%;
      justify-content: center;
      display: flex;
      p {
        font-size: 12px;
      }
      .record {
        align-items: center;
        display: flex;
        margin-right: 5px;
        img {
          width: 20px;
          height: 20px;
          margin: 0 6px;
          display: block;
        }
      }
    }
  }
}
</style>
