NotFound.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <div class="not-found">
  3. <div class="content">
  4. <div class="code">
  5. <span class="digit">4</span>
  6. <span class="digit zero">0</span>
  7. <span class="digit">4</span>
  8. </div>
  9. <div class="divider"></div>
  10. <p class="message">页面未找到</p>
  11. <p class="hint">您访问的页面不存在或已被移除</p>
  12. <button class="btn-back" @click="goBack">返回首页</button>
  13. </div>
  14. <div class="grid-bg"></div>
  15. </div>
  16. </template>
  17. <script>
  18. export default {
  19. name: 'NotFound',
  20. methods: {
  21. goBack() {
  22. this.$router.push('/login');
  23. }
  24. }
  25. }
  26. </script>
  27. <style scoped>
  28. .not-found {
  29. position: fixed;
  30. inset: 0;
  31. display: flex;
  32. align-items: center;
  33. justify-content: center;
  34. background: radial-gradient(ellipse at 50% 40%, #0a1628 0%, #050d1a 100%);
  35. overflow: hidden;
  36. font-family: 'Helvetica Neue', Arial, sans-serif;
  37. }
  38. .grid-bg {
  39. position: absolute;
  40. inset: 0;
  41. background-image:
  42. linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
  43. linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  44. background-size: 60px 60px;
  45. pointer-events: none;
  46. }
  47. .content {
  48. position: relative;
  49. z-index: 1;
  50. display: flex;
  51. flex-direction: column;
  52. align-items: center;
  53. gap: 20px;
  54. }
  55. .code {
  56. display: flex;
  57. align-items: center;
  58. gap: 8px;
  59. }
  60. .digit {
  61. font-size: 120px;
  62. font-weight: 800;
  63. line-height: 1;
  64. color: transparent;
  65. background: linear-gradient(180deg, #3b82f6 0%, #1e3a6e 100%);
  66. -webkit-background-clip: text;
  67. background-clip: text;
  68. text-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
  69. user-select: none;
  70. }
  71. .digit.zero {
  72. animation: pulse 2.5s ease-in-out infinite;
  73. }
  74. @keyframes pulse {
  75. 0%, 100% { opacity: 1; }
  76. 50% { opacity: 0.4; }
  77. }
  78. .divider {
  79. width: 80px;
  80. height: 2px;
  81. background: linear-gradient(90deg, transparent, #3b82f6, transparent);
  82. border-radius: 1px;
  83. }
  84. .message {
  85. font-size: 22px;
  86. font-weight: 600;
  87. color: #e0e6f1;
  88. margin: 0;
  89. letter-spacing: 4px;
  90. }
  91. .hint {
  92. font-size: 14px;
  93. color: #758599;
  94. margin: 0;
  95. }
  96. .btn-back {
  97. margin-top: 12px;
  98. padding: 10px 36px;
  99. font-size: 14px;
  100. color: #ffffff;
  101. background: rgba(59, 130, 246, 0.15);
  102. border: 1px solid rgba(59, 130, 246, 0.4);
  103. border-radius: 4px;
  104. cursor: pointer;
  105. transition: all 0.25s;
  106. letter-spacing: 2px;
  107. }
  108. .btn-back:hover {
  109. background: rgba(59, 130, 246, 0.3);
  110. border-color: rgba(59, 130, 246, 0.7);
  111. box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
  112. }
  113. .btn-back:active {
  114. transform: translateY(1px);
  115. }
  116. </style>