error.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. ],
  32. errorType:0
  33. }
  34. },
  35. onLoad(query) {
  36. if(query.errorType!==undefined){
  37. this.errorType=query.errorType
  38. }
  39. },
  40. mounted() {
  41. },
  42. methods: {
  43. closeSys(){
  44. let userAgent = navigator.userAgent;
  45. if (userAgent.indexOf('Firefox') !== -1 || userAgent.indexOf('Chrome') !== -1) return window.location.href = 'about: blank';
  46. return window.opener = null,window.open('about: blank', '_self'),window.close();
  47. }
  48. }
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. @import url("/components/static/css/en-common.css") ;
  53. .error-box{
  54. width: 100vw;
  55. height: 100vh;
  56. background: #fff;
  57. .error-content{
  58. padding-top: 300rpx;
  59. .error-icon{
  60. text-align: center;
  61. text{
  62. font-size: 240rpx;
  63. color: #9197a5;
  64. }
  65. }
  66. .error-text{
  67. font-size: 32rpx;
  68. text-align: center;
  69. font-weight: 600;
  70. color: #9197a5;
  71. }
  72. .error-but{
  73. button{
  74. width: calc(100% - 60rpx);
  75. height: 82rpx;
  76. line-height: 82rpx;
  77. border: 0;
  78. border-radius: 6rpx;
  79. background: #9197a5;
  80. color: #FFFFFF;
  81. letter-spacing: 4rpx;
  82. margin-top: 40rpx;
  83. }
  84. }
  85. }
  86. }
  87. </style>