error.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <div class="content">
  3. <v-logo></v-logo>
  4. <div class="warn">
  5. <img src="@/static/svg/icon-warn.svg" alt="" />
  6. <p v-if="error.statusCode == 301">{{ error.message || 'error' }}</p>
  7. </div>
  8. </div>
  9. </template>
  10. <script>
  11. import Report from '@/log-center/log';
  12. import VLogo from '@/components/logo.vue';
  13. import { getMid, appVersionCode } from '@/utils/help';
  14. export default {
  15. name: 'error',
  16. props: ['error'],
  17. components: {
  18. VLogo,
  19. },
  20. data() {
  21. return {
  22. mid: getMid(),
  23. };
  24. },
  25. mounted() {
  26. // 埋点
  27. Report.reportLog({
  28. baseInfo: {
  29. appVersionCode: appVersionCode,
  30. mid: this.mid,
  31. pageSource: Report.pageSource.error_landing_page,
  32. machineCode: this.mid,
  33. },
  34. params: {
  35. url: window.location.href,
  36. },
  37. });
  38. },
  39. };
  40. </script>
  41. <style lang="scss" scoped>
  42. html,
  43. body,
  44. #__nuxt,
  45. #__layout {
  46. width: 100%;
  47. height: 100%;
  48. padding: 0;
  49. margin: 0;
  50. }
  51. .content {
  52. width: 100%;
  53. height: 100%;
  54. background: linear-gradient(180deg, #d8efff 0%, #ffffff 44.3%);
  55. display: flex;
  56. justify-content: center;
  57. align-items: center;
  58. .warn {
  59. text-align: center;
  60. color: #aab4b9;
  61. img {
  62. width: 100px;
  63. height: 100px;
  64. }
  65. p {
  66. margin-top: 20px;
  67. font-weight: 700;
  68. font-size: 30px;
  69. }
  70. }
  71. }
  72. </style>