index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <div class="router-err">
  3. <div class="router-err__icon">
  4. <img src="img/404.png" />
  5. </div>
  6. <div class="router-err__content">
  7. <h2>无权限或找不到页面</h2>
  8. <p>当前页面无权限访问或者打开了一个不存在的链接,请检查当前账户权限和链接的可访问性。</p>
  9. <el-button type="primary" plain round @click="gohome">返回首页</el-button>
  10. <el-button type="primary" plain round @click="gologin">重新登录</el-button>
  11. <el-button type="primary" round @click="goback">返回上一页</el-button>
  12. </div>
  13. </div>
  14. </template>
  15. <script>
  16. export default {
  17. methods: {
  18. gohome(){
  19. location.href="#/"
  20. },
  21. goback(){
  22. this.$router.go(-1);
  23. },
  24. gologin(){
  25. this.$router.push("/login");
  26. }
  27. }
  28. }
  29. </script>
  30. <style scoped>
  31. .router-err {display: flex;width: 900px;margin: 50px auto;align-items: center;}
  32. .router-err__icon {width: 400px;}
  33. .router-err__icon img {width: 100%;}
  34. .router-err__content {flex: 1;padding:40px;}
  35. .router-err__content h2 {font-size: 26px;}
  36. .router-err__content p {font-size: 14px;color: #999;margin: 15px 0 30px 0;line-height: 1.5;}
  37. @media (max-width: 992px){
  38. .router-err {display: block;width: 100%;margin-top: 10px;text-align: center;}
  39. .router-err__icon {width: 280px;margin: 0 auto;}
  40. }
  41. </style>