error.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <div class="errorBox">
  3. <img src="https://img.bjzxtw.org.cn/pre/public/error/404.png" alt="遇到了网络错误!">
  4. <div @click="goHome" class="goHome">
  5. 返回网站首页
  6. </div>
  7. </div>
  8. </template>
  9. <script setup>
  10. //import { ElButton } from 'element-plus'
  11. const router = useRouter()
  12. //跳转回到首页
  13. const goHome = () => {
  14. router.push('/')
  15. }
  16. </script>
  17. <style lang="less" scoped>
  18. @media screen and (min-width: 1401px) {
  19. .errorBox {
  20. width: 100%;
  21. text-align: center;
  22. padding-top: 150PX;
  23. img {
  24. width: 532PX;
  25. height: 440PX;
  26. margin: 0 auto;
  27. }
  28. .goHome {
  29. width: 152PX;
  30. height: 48PX;
  31. line-height: 48PX;
  32. font-size: 16PX;
  33. color: #fff;
  34. text-align: center;
  35. margin: 0 auto;
  36. background: #028E21;
  37. border-radius: 8PX;
  38. margin-top: 70PX;
  39. cursor: pointer;
  40. }
  41. }
  42. }
  43. @media screen and (min-width: 801px) and (max-width: 1400px) {
  44. .errorBox {
  45. width: 100%;
  46. text-align: center;
  47. padding-top: 150PX;
  48. img {
  49. width: 532PX;
  50. height: 440PX;
  51. margin: 0 auto;
  52. }
  53. .goHome {
  54. width: 152PX;
  55. height: 48PX;
  56. line-height: 48PX;
  57. font-size: 16PX;
  58. color: #fff;
  59. text-align: center;
  60. margin: 0 auto;
  61. background: #028E21;
  62. border-radius: 8PX;
  63. margin-top: 70PX;
  64. cursor: pointer;
  65. }
  66. }
  67. }
  68. @media screen and (max-width: 800px) {
  69. .errorBox {
  70. width: 100%;
  71. text-align: center;
  72. padding-top: 150px;
  73. img {
  74. width: 532px;
  75. height: 440px;
  76. margin: 0 auto;
  77. }
  78. .goHome {
  79. width: 152px;
  80. height: 48px;
  81. line-height: 48px;
  82. font-size: 16px;
  83. color: #fff;
  84. text-align: center;
  85. margin: 0 auto;
  86. background: #028E21;
  87. border-radius: 8px;
  88. margin-top: 70px;
  89. cursor: pointer;
  90. }
  91. }
  92. }
  93. // .errorBox {
  94. // width: 100%;
  95. // text-align: center;
  96. // padding-top: 150px;
  97. // img {
  98. // width: 532px;
  99. // height: 440px;
  100. // margin: 0 auto;
  101. // }
  102. // .goHome {
  103. // width: 152px;
  104. // height: 48px;
  105. // line-height: 48px;
  106. // font-size: 16px;
  107. // color: #fff;
  108. // text-align: center;
  109. // margin: 0 auto;
  110. // background: #028E21;
  111. // border-radius: 8px;
  112. // margin-top: 70px;
  113. // cursor: pointer;
  114. // }
  115. // }
  116. </style>