ContentError.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <div class="error-module">
  3. <div class="error-module-container">
  4. <img class="error-img" src="@/assets/images/empty/jy-back.png">
  5. <p class="error-text">{{ errorText }}</p>
  6. <p class="error-text">5s后自动跳转到剑鱼官网首页</p>
  7. <button class="error-btn" @click="backHome">前往剑鱼官网首页</button>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. export default {
  13. name: 'Error',
  14. props: {
  15. errorText: {
  16. type: String,
  17. default: ''
  18. }
  19. },
  20. data() {
  21. return {}
  22. },
  23. mounted() {
  24. setTimeout(() => {
  25. window.top.location.href = '/'
  26. }, 5000)
  27. },
  28. methods: {
  29. backHome() {
  30. window.top.location.href = '/'
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .error-module {
  37. width: 980px;
  38. height: 580px;
  39. margin-right: 24px;
  40. background: #fff;
  41. border-radius: 8px;
  42. &-container{
  43. display: flex;
  44. flex-direction: column;
  45. justify-content: center;
  46. align-items: center;
  47. padding: 128px 0;
  48. height: 100%;
  49. .error-img{
  50. width: 200px;
  51. height: 200px;
  52. object-fit: contain;
  53. }
  54. .error-text{
  55. margin-top: 4px;
  56. font-size: 15px;
  57. color: #999;
  58. line-height: 22px;
  59. }
  60. .error-btn{
  61. width: 180px;
  62. height: 40px;
  63. line-height: 40px;
  64. text-align: center;
  65. margin-top: 24px;
  66. background: #2ABED1;
  67. color: #fff;
  68. font-size: 15px;
  69. border-radius: 4px;
  70. }
  71. }
  72. }
  73. </style>