<template>
  <div class="container">
    <div class="box">
      <h1 class="tips">你的浏览器版本较低，请升级你的浏览器。</h1>
      <div class="list">
        <ul>
          <li>
            <a href="https://www.google.cn/chrome" target="_blank">
              <img src="../../assets/images/chrome.png" />
              <p class="t1">Chrome</p>
              <p class="t2">Google</p>
            </a>
          </li>
          <li>
            <a href="https://www.microsoft.com/edge" target="_blank">
              <img src="../../assets/images/edge.png" />
              <p class="t1">Edge</p>
              <p class="t2">Microsoft</p>
            </a>
          </li>
          <li>
            <a href="https://download.mozilla.org" target="_blank">
              <img src="../../assets/images/firefox.png" />
              <p class="t1">Firefox</p>
              <p class="t2">Mozilla Foundation</p>
            </a>
          </li>
        </ul>
      </div>
    </div>
    <p style="font-size: 12px">{{ UA }}</p>
  </div>
</template>

<script>
export default {
  data() {
    const UA = window.navigator.userAgent
    const isIe = window.ActiveXObject || 'ActiveXObject' in window
    return { UA, isIe }
  },
  beforeMount() {
    !this.isIe && this.$router.replace('/')
  }
}
</script>

<style lang="scss" scoped>
.container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.box {
  background-color: #fff4f4;
  border-radius: 10px;
}
.tips {
  margin: 30px;
  font-size: 24px;
  color: #313131;
  text-align: center;
}
ul {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  li {
    padding: 40px;
  }
  img {
    width: 100px;
  }
  p {
    margin: 0;
    text-align: center;
  }
  .t1 {
    color: #e25600;
  }
  .t2 {
    color: #aaa;
    text-decoration: none;
  }
  a {
    text-decoration: none;
  }
}
</style>
