index.vue 968 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view class="not-defined">
  3. <img src="@/static/img/404.png" />
  4. <view class="content">
  5. <h3 class="title">页面未找到</h3>
  6. <span
  7. >抱歉!您访问的页面不存在,请返回上一级或点击下方按钮返回首页...</span
  8. >
  9. </view>
  10. <view class="btn" @click="$Route.replace({ path: '/' })">
  11. 返回首页
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. name: "NotDefined",
  18. mounted() {
  19. console.log(this.$Route)
  20. }
  21. };
  22. </script>
  23. <style scoped lang="scss">
  24. .not-defined img {
  25. width: 100%;
  26. margin-top: 18%;
  27. }
  28. .content {
  29. padding: 0 1rem;
  30. text-align: center;
  31. color: #44405e;
  32. font-size: 15px;
  33. }
  34. .title {
  35. margin-bottom: 0.6rem;
  36. color: #302c48;
  37. font-size: 20px;
  38. }
  39. .btn {
  40. color: #fff;
  41. background-color: #ef4c4c;
  42. font-size: 16px;
  43. padding: 0.16rem;
  44. border-radius: 25px;
  45. text-align: center;
  46. width: 2.4rem;
  47. margin: 0 auto;
  48. margin-top: 1rem;
  49. }
  50. </style>