<template>
  <div class="page_startPage">
    <img class="startImg" src="../../assets/images/start.png" alt />
    <div class="jump">跳过</div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      count: ""
    };
  },
  methods: {
    JumpSet() {
      this.$router.push({ path: "/login" });
    },
    getJumpPage() {
      const TIME_COUNT = 2;
      if (!this.timer) {
        this.count = TIME_COUNT;
        this.timer = setInterval(() => {
          if (this.count > 0 && this.count <= TIME_COUNT) {
            this.count--;
          } else {
            clearInterval(this.timer);
            this.timer = null;
            this.$router.push({ path: "/login" });
          }
        }, 1000);
      }
    }
  },
  created() {
    this.getJumpPage();
  }
};
</script>

<style lang="scss" scoped>
.page_startPage {
  overflow: hidden;
  height: 100%;
}
.startImg {
  width: 100%;
  height: 100%;
}
.jump {
  position: fixed;
  color: #338afb;
  top: 5%;
  right: 10%;
  border-radius: 30px;
  border: 1px solid #338afb;
  text-align: center;
  line-height: 1.875rem;
  height: 1.875rem;
  width: 3.75rem;
}
</style>
