<template>
    <div class="wscn-http404-container">
        <div class="wscn-http404">
            <div class="wscn-http404__oops">无权限或找不到页面</div>
            <div class="wscn-http404__info">当前页面无权限访问或者打开了一个不存在的链接，请检查当前账户权限和链接的可访问性。</div>
            <div class="wscn-http404__btn">
                <el-button type="primary" plain @click="gohome">返回首页</el-button>
                <el-button type="primary" @click="goback">返回上一页</el-button>
            </div>
        </div>
    </div>
</template>

<script setup>
const router = useRouter();

function gohome() {
    location.href = "/";
}

function goback() {
    router.go(-1);
}
</script>

<style lang="scss" scoped>
@keyframes slideUp {
  0% {
    transform: translateY(60px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.wscn-http404-container {
  transform: translate(-50%, -50%);
  position: absolute;
  top: 40%;
  left: 50%;

  .wscn-http404 {
    overflow: hidden;
    width: 1200px;
    padding: 30px 50px;
    text-align: center;

    .wscn-http404__oops {
      margin-bottom: 20px;
      line-height: 40px;
      font-size: 32px;
      font-weight: bold;
      color: var(--el-color-primary);
      opacity: 0;
      animation-name: slideUp;
      animation-duration: 0.5s;
      animation-fill-mode: forwards;
    }

    .wscn-http404__info {
      margin-bottom: 30px;
      line-height: 21px;
      font-size: 13px;
      color: var(--el-color-info);
      opacity: 0;
      animation-name: slideUp;
      animation-duration: 0.5s;
      animation-delay: 0.2s;
      animation-fill-mode: forwards;
    }

    .wscn-http404__btn {
      .el-button {
        width: 110px;
        height: 36px;
        padding: 0;
        border: none;
        border-radius: 100px;
        line-height: 36px;
        opacity: 0;
        animation-name: slideUp;
        animation-duration: 0.5s;
        animation-delay: 0.3s;
        animation-fill-mode: forwards;
      }

      .el-button + .el-button {
        margin-left: 60px;
      }
    }
  }
}
</style>