ErrorPageLayout.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <div class="error-page">
  3. <div style="display:flex;align-items:center;">
  4. <div class="error-page-svg">
  5. <slot />
  6. </div>
  7. <div>
  8. <div class="ZH">抱歉,您没有访问权限!</div>
  9. <div class="EN">
  10. <div>
  11. <span style="font-size:28px">W</span>
  12. <span>e are </span>
  13. <span style="font-size:34px">sorry,</span>
  14. </div>
  15. <div>
  16. you have no access permission!
  17. </div>
  18. </div>
  19. <div class="foot">
  20. 5秒后将自动跳到首页......
  21. </div>
  22. </div>
  23. </div>
  24. <el-button type="primary" @click="to">回到首页</el-button>
  25. </div>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. timer:null,
  32. }
  33. },
  34. mounted() {
  35. var that = this
  36. this.timer = setTimeout(()=>{
  37. that.to()
  38. },5000)
  39. },
  40. methods: {
  41. to(){
  42. this.$router.replace(
  43. {
  44. path:'/home'
  45. }
  46. )
  47. clearTimeout(this.timer)
  48. }
  49. },
  50. beforeDestroy() {
  51. clearTimeout(this.timer)
  52. },
  53. }
  54. </script>
  55. <style lang="scss" scoped>
  56. .error-page {
  57. height: 100%;
  58. display: flex;
  59. flex-direction: column;
  60. justify-content: center;
  61. align-items: center;
  62. &-svg {
  63. width: 400px;
  64. margin-bottom: 50px;
  65. }
  66. }
  67. .ZH{
  68. font-size: 34px;
  69. }
  70. .EN{
  71. font-family: 'Courier New', Courier, monospace;
  72. font-size: 22px;
  73. font-weight: 600;
  74. color: rgb(255,71,95);
  75. }
  76. .foot{
  77. margin: 20px 0;
  78. }
  79. </style>