<template>
  <div class="container">
    <div v-if="error.statusCode === 404" class="page">
      <div class="error">
        <div class="err-img">
          <img src="~/assets/images/index/404.png" alt="" srcset="">
        </div>
        <div class="err-msg">出错啦！你访问的页面没找到！ </div>
        <div class="err_btn">
          <nuxt-link to="/">回到首页</nuxt-link>
        </div>
      </div>
    </div>
    <div v-else class="page">
      <div class="error">
        <div class="err-img">
          <img src="~/assets/images/index/500.png" alt="" srcset="">
        </div>
        <div class="err-msg">出错啦！你访问的页面没找到！ </div>
        <div class="err_btn">
          <nuxt-link to="/">回到首页</nuxt-link>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: ['error'],
    layout: 'empty'
  }
</script>

<style lang="scss" scoped>
.page{
  .error {
    margin: 100px auto 150px;
    text-align: center;
    .err-img {
      font-size: 0;
      img {
        width: 891px;
        height: 431px;
      }
    }
    .err-msg {
      height: 46px;
      font-size: 24px;
      font-family: PingFangSC-Regular, sans-serif;
      font-weight: 400;
      color: #333333;
      line-height: 45px;
      margin: 100px auto 50px;
    }
    .err_btn {
      width: 215px;
      margin: 0 auto;
      height: 58px;
      line-height: 58px;
      background: #45AEFF;
      border-radius: 4px;
      a {
        font-size: 26px;
        font-family: PingFangSC-Semibold, sans-serif;
        font-weight: 600;
        color: #FFFFFF;
      }
    }
  }
}
</style>