404.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <div class="wrapper">
  3. <div class="http404-container">
  4. <img :onerror='`this.src="${require("@/assets/noimgsrc.png")}"`'
  5. class="pic"
  6. src="@/assets/404_images/404.png"
  7. alt="">
  8. <div class="title">抱歉,您要访问的页面丢失了</div>
  9. <div class="desc">请检查您输入的网址是否正确,请点击以下按钮返回首页</div>
  10. <div
  11. class="btn"
  12. @click="handleBack">
  13. 返回首页
  14. </div>
  15. </div>
  16. </div>
  17. </template>
  18. <script>
  19. export default {
  20. name: 'Page404',
  21. methods: {
  22. handleBack() {
  23. this.$router.push('/')
  24. }
  25. }
  26. }
  27. </script>
  28. <style rel="stylesheet/scss" lang="scss" scoped>
  29. .wrapper {
  30. position: relative;
  31. }
  32. .http404-container {
  33. position: relative;
  34. top: 50%;
  35. transform: translateY(-50%);
  36. .pic {
  37. width: 600px;
  38. display: block;
  39. margin: 0 auto;
  40. }
  41. .title {
  42. width: 100%;
  43. text-align: center;
  44. font-size: 24px;
  45. color: #111;
  46. line-height: 38px;
  47. margin-top: 77px;
  48. }
  49. .desc {
  50. width: 100%;
  51. font-size: 18px;
  52. color: #777;
  53. text-align: center;
  54. line-height: 38px;
  55. margin-top: 8px;
  56. }
  57. .btn {
  58. width: 125px;
  59. height: 44px;
  60. text-align: center;
  61. font-size: 14px;
  62. color: #fefefe;
  63. line-height: 44px;
  64. background: #2362FB;
  65. border-radius: 6px;
  66. margin: 50px auto 0;
  67. cursor: pointer;
  68. }
  69. }
  70. @media screen and (max-width: 1500px) {
  71. .http404-container {
  72. .pic {
  73. width: 500px;
  74. }
  75. .title {
  76. margin-top: 50px;
  77. }
  78. .btn {
  79. margin-top: 40px;
  80. }
  81. }
  82. }
  83. </style>