error.vue 1.8 KB

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