<template>
  <div class="exception">
    <div class="errorpage">
      <div class="xiaocao">
        <img src="https://s1.pstatp.com/ee/feishu_website/static/img/toy4.635d004af4.svg" alt="">
      </div>
    <div class="content">         
      <div class="desc">
        <span class="tip">出错啦！</span>
        {{desc}}
      </div>
      <div class="action">
        <a-button type="primary" @click="handleToHome" size='large'>返回登录</a-button>
      </div>
    </div>
    <div class="img">
      <img class="person" src="https://s0.pstatp.com/ee/feishu_website/static/img/toy6.0df0d49140.png"/>
      <img class="shuxian" src="https://s3.pstatp.com/ee/feishu_website/static/img/toy9.8969d3ec2f.svg" alt="">
    </div>
    </div>
  </div>
</template>

<script>

  export default {
    name: "Exception",
    // props: {
    //   type: {
    //     type: String,
    //     default: '404'
    //   }
    // },
    data() {
      return {
        title:'',
        desc:''
      }
    },
    methods: {
      handleToHome() {
         this.$router.replace({name: 'login'})
      }
    },
    mounted() {
      console.log(this.$route.query);
      this.title=this.$route.query.title;
      this.desc=this.$route.query.desc;

    }
  }
</script>

<style lang="scss" scoped>
  .exception {
    // min-height: 500px;
    height: 100%;
    align-items: center;
    text-align: center;
    padding-top: 150px;
    box-sizing: border-box;
    background-color: #fff;
    .errorpage{
        position: relative;
        width: 50%;
        margin: 0 auto;
        .xiaocao{
          width: 100px;
          display: inline-block;
          position: absolute;
          bottom: 10px;
          left: 10px;
        }
    }
    .errorpage:after{
      content: '';
      display: block;
      width: 100%;
      height: 2px;
      background-color:#000;
      position: absolute;
      bottom: 10px;
      z-index: 0;
    }
    .img {
      display: inline-block;
      width: 400px; 
      zoom: 1;
      position: relative;
      .person {
        width: 62.5%;
        display: inline-block;
      }
      .shuxian{
        width: 37.5%;
        display: inline-block;
        position: absolute;
        bottom: 10px;
      }
    }
    
    .content {
      display: inline-block;
      flex: auto;
      margin-right: 50px;
      
      h1 {
        color: #434e59;
        font-size: 72px;
        font-weight: 600;
        line-height: 72px;
        margin-bottom: 24px;
      }

      .desc {
        color: #333;
        font-size: 16px;
        line-height: 28px;
        margin-bottom: 16px;
        width: 210px;
        height: 124px;
        padding: 10px 15px;
       background-image: url('https://s1.pstatp.com/ee/feishu_website/static/img/toy1.286bfce8d0.svg');
        border-radius: 5px;
        .tip{
          display: block;
          text-align: left;
          margin-bottom: 5px;
          font-size: 20px;
          color: #999;
        }
      }
      .action{
        margin-top: 20px;
      }
    }
  }

  .mobile {
    .exception {
      margin-top: 30px;

      .img {
        padding-right: unset;

        img {
          height: 40%;
          max-width: 80%;
        }
      }
    }
  }
</style>