<template>
  <view class="error-box">
    <view class="error-content">
      <view class="error-icon">
        <text  class="iconfont">
          &#xe678;
        </text>
      </view>
      <view class="error-text">
        {{errorMsg}}
      </view>
      <view class="error-but">
        <button @click="closeSys">退出程序</button>
      </view>
    </view>


  </view>
</template>
<script>
export default {
  name: "error",
  props: {},
  components: {},
  data() {
    return {
      errorMsg:'出错啦！~~'
    }
  },
  onLoad(query) {
    if(query.errorMsg!==undefined){
      this.errorMsg=decodeURI(query.errorMsg);
    }
  },
  mounted() {

  },
  methods: {
    closeSys(){
      let userAgent = navigator.userAgent;
      if (userAgent.indexOf('Firefox') !== -1 || userAgent.indexOf('Chrome') !== -1) return window.location.href = 'about: blank';
      return window.opener = null,window.open('about: blank', '_self'),window.close();
    }
  }

}
</script>

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

}

</style>