<template>
  <div class="page404">
    <div class="content">
        <el-image style="width: 100%;height:100%" :src="require('@/assets/img/404.jpg')" fits="contain"></el-image>
        <div class="btn">
            <el-button  type="text" @click="to">回到首页</el-button> 
        </div>
        
        
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  props: {},
  data() {
    return {
        timer:null
    };
  },
  watch: {},
  computed: {},
  created() {},
  mounted() {
    // var that = this
    // this.timer = setTimeout(()=>{
    //   that.to()
    // },5000)
  },
  beforeDestroy() {
    clearTimeout(this.timer)
  },
  methods: {
    to(){
      this.$router.replace(
        {
          path:'/home'
        }
      )
      clearTimeout(this.timer)
    }
  },
};
</script>
<style lang="scss" scoped>
.page404{
    position: relative;
    height: 100%;
    .content{
        width: 1000px;
        height: 600px;
        position: absolute;
        inset: 0;
        margin: auto;
    }
    .btn{
        display: flex;
        justify-content: center;
    }
}
</style>