<template>
  <view class="error-box">
    <view class="error-content">
      <view class="error-icon">
        <text  class="iconfont">
          &#xe678;
        </text>
      </view>
      <view class="error-text" v-if="!errorType">
        {{$t('index.error.errorMsg')}}~~
      </view>
      <view class="error-text" v-else>
        {{$t('index.error.errorMsg.'+errorKey[errorType])}}~~
      </view>
      <view class="error-but">
        <button @click="closeSys">{{$t('index.error.quit')}}</button>
      </view>
    </view>


  </view>
</template>
<script>
export default {
  name: "error-page",
  props: {},
  components: {},
  data() {
    return {
      errorKey:[
          'errorMsg',
          'noWallet',
          'noAddress',
          'noInvite',
          'noInvest',
          'noChainId',
      ],
      errorType:0
    }
  },
  onLoad(query) {
    if(query.errorType!==undefined){
        this.errorType=query.errorType*1
    }
  },
  mounted() {

  },
  methods: {
    closeSys(){
      this.$router.push('/cc_list')
    }
  }

}
</script>

<style scoped lang="scss">
//@import url("/components/static/css/en-common.css") ;
.error-box{
  width: 100vw;
  height: 100vh;
  background: #fff;
  .error-content{
    padding-top: 300rpx;
    .error-icon{
      text-align: center;
      text{
        font-size: 240rpx;
        color: #9197a5;
      }
    }
    .error-text{
      font-size: 32rpx;
      text-align: center;
      font-weight: 600;
      color: #9197a5;
    }
    .error-but{
      button{
        width: calc(100% - 60rpx);
        height: 82rpx;
        line-height: 82rpx;
        border: 0;
        border-radius: 6rpx;
        background: #9197a5;
        color: #FFFFFF;
        letter-spacing: 4rpx;
        margin-top: 40rpx;
      }
    }
  }

}

</style>
