error.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <view class="error-box">
  3. <view class="error-content">
  4. <view class="error-icon">
  5. <text class="iconfont">
  6. &#xe678;
  7. </text>
  8. </view>
  9. <view class="error-text" v-if="!errorType">
  10. {{$t('index.error.errorMsg')}}~~
  11. </view>
  12. <view class="error-text" v-else>
  13. {{$t('index.error.errorMsg.'+errorKey[errorType])}}~~
  14. </view>
  15. <view class="error-but">
  16. <button @click="closeSys">{{$t('index.error.quit')}}</button>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. name: "error",
  24. props: {},
  25. components: {},
  26. data() {
  27. return {
  28. errorKey:[
  29. 'errorMsg',
  30. 'noWallet',
  31. 'noAddress',
  32. 'noInvite',
  33. 'noInvest',
  34. ],
  35. errorType:0
  36. }
  37. },
  38. onLoad(query) {
  39. if(query.errorType!==undefined){
  40. this.errorType=query.errorType*1
  41. }
  42. },
  43. mounted() {
  44. },
  45. methods: {
  46. closeSys(){
  47. let userAgent = navigator.userAgent;
  48. if (userAgent.indexOf('Firefox') !== -1 || userAgent.indexOf('Chrome') !== -1) return window.location.href = 'about: blank';
  49. return window.opener = null,window.open('about: blank', '_self'),window.close();
  50. }
  51. }
  52. }
  53. </script>
  54. <style scoped lang="scss">
  55. @import url("/components/static/css/en-common.css") ;
  56. .error-box{
  57. width: 100vw;
  58. height: 100vh;
  59. background: #fff;
  60. .error-content{
  61. padding-top: 300rpx;
  62. .error-icon{
  63. text-align: center;
  64. text{
  65. font-size: 240rpx;
  66. color: #9197a5;
  67. }
  68. }
  69. .error-text{
  70. font-size: 32rpx;
  71. text-align: center;
  72. font-weight: 600;
  73. color: #9197a5;
  74. }
  75. .error-but{
  76. button{
  77. width: calc(100% - 60rpx);
  78. height: 82rpx;
  79. line-height: 82rpx;
  80. border: 0;
  81. border-radius: 6rpx;
  82. background: #9197a5;
  83. color: #FFFFFF;
  84. letter-spacing: 4rpx;
  85. margin-top: 40rpx;
  86. }
  87. }
  88. }
  89. }
  90. </style>