404.vue 830 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <view class="container">
  3. <view class="img">
  4. <img src="../../static/no-bus.png">
  5. </view>
  6. <view class="info">
  7. {{info}}
  8. </view>
  9. </view>
  10. </template>
  11. <script setup>
  12. import {
  13. ref
  14. } from "vue"
  15. import {
  16. onLoad
  17. } from "@dcloudio/uni-app"
  18. import {
  19. getQueryString
  20. } from "../../util/getParams.js"
  21. const info = ref('')
  22. onLoad(() => {
  23. getMessage()
  24. })
  25. const getMessage = () => {
  26. const message = getQueryString('message')
  27. if (message) {
  28. info.value = message
  29. } else {
  30. info.value = '404'
  31. }
  32. }
  33. </script>
  34. <style lang="scss" scoped>
  35. .container {
  36. display: flex;
  37. flex-direction: column;
  38. align-items: center;
  39. .img {
  40. margin-top: 200rpx;
  41. width: 480rpx;
  42. height: 508rpx;
  43. img {
  44. width: 100%;
  45. height: 100%;
  46. }
  47. }
  48. .info {
  49. padding: 0 30rpx;
  50. }
  51. }
  52. </style>