p404.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <div class="auth-fail-page">
  3. <view class="seal">
  4. <view class="seal-son">
  5. <span class="quan">授权失败</span>
  6. <span class="dt">{{d}} {{t}}</span>
  7. </view>
  8. </view>
  9. <p class="ptxt">{{ message }}</p>
  10. <p class="error-message ptxt">很抱歉,您的授权未能成功。</p>
  11. <p class="error-message">请稍后重试或联系客服。</p>
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. name: 'p404',
  17. data() {
  18. return {
  19. message: '',
  20. d: '',
  21. t: ''
  22. }
  23. },
  24. onLoad(options) {
  25. // console.log(options.message);
  26. // 印章中的时间
  27. this.getDataTime();
  28. if (!options.hasOwnProperty("message")) {
  29. uni.showToast({
  30. title: '未传错误信息',
  31. duration: 3000
  32. })
  33. return;
  34. } else {
  35. if (options.message === undefined || options.message === null) {
  36. uni.showToast({
  37. title: '未获取错误信息',
  38. duration: 3000
  39. })
  40. return;
  41. }
  42. }
  43. // 错误信息
  44. this.message = options.message;
  45. },
  46. methods: {
  47. getDataTime() {
  48. const currentDate = new Date();
  49. const year = currentDate.getFullYear();
  50. const month = String(currentDate.getMonth() + 1).padStart(2, '0');
  51. const day = String(currentDate.getDate()).padStart(2, '0');
  52. const hours = String(currentDate.getHours()).padStart(2, '0');
  53. const minutes = String(currentDate.getMinutes()).padStart(2, '0');
  54. const seconds = String(currentDate.getSeconds()).padStart(2, '0');
  55. this.d = year + '.' + month + '.' + day;
  56. this.t = hours + ':' + minutes;
  57. }
  58. }
  59. };
  60. </script>
  61. <style>
  62. .auth-fail-page {
  63. font-family: Arial, sans-serif;
  64. background-color: #f8f8f8;
  65. text-align: center;
  66. padding: 20px;
  67. position: relative;
  68. }
  69. .seal {
  70. width: 260rpx;
  71. height: 260rpx;
  72. border: solid 6rpx #aa0000;
  73. border-radius: 50%;
  74. background-color: rgba(255, 255, 255, 0.8);
  75. display: flex;
  76. justify-content: center;
  77. align-items: center;
  78. position: absolute;
  79. left: 245rpx;
  80. top: 100rpx;
  81. opacity: 0.8;
  82. }
  83. .seal-son {
  84. width: 245rpx;
  85. height: 245rpx;
  86. border: solid 2rpx #aa0000;
  87. border-radius: 100%;
  88. background-color: rgba(255, 255, 255, 0.8);
  89. position: relative;
  90. }
  91. .quan {
  92. position: absolute;
  93. top: 75rpx;
  94. right: 65rpx;
  95. text-align: center;
  96. font-size: 40rpx;
  97. transform: rotate(-45deg);
  98. color: #aa0000;
  99. font-weight: 900;
  100. }
  101. /* 竖屏样式 */
  102. @media (orientation: portrait) {
  103. /* 在这里添加竖屏时的样式 */
  104. .dt {
  105. position: absolute;
  106. top: 123rpx;
  107. left: 77rpx;
  108. text-align: center;
  109. font-size: 34rpx;
  110. transform: rotate(-45deg);
  111. color: #aa0000;
  112. }
  113. }
  114. /* 横屏样式 */
  115. @media (orientation: landscape) {
  116. /* 在这里添加横屏时的样式 */
  117. .dt {
  118. position: absolute;
  119. top: 123rpx;
  120. left: 77rpx;
  121. line-height: 2.5rem;
  122. text-align: center;
  123. font-size: 34rpx;
  124. transform: rotate(-45deg);
  125. color: #aa0000;
  126. }
  127. }
  128. .error-message {
  129. color: #999;
  130. margin: 30rpx auto;
  131. }
  132. .ptxt {
  133. color: #666;
  134. font-size: 20px;
  135. margin: 380rpx auto 0rpx;
  136. }
  137. </style>