default.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <div ref="container" class="default-page">
  3. <img :src="getImagePath('default.png')" alt="Image" class="mimg" />
  4. <p class="mp">{{ description }}</p>
  5. </div>
  6. </template>
  7. <script>
  8. export default {
  9. data() {
  10. return {
  11. description: "酒店预定系统8月15正式开放"
  12. };
  13. },
  14. mounted() {
  15. const screenHeight = this.getScreenHeight();
  16. this.$refs.container.style.height = `${screenHeight}px`;
  17. },
  18. methods: {
  19. getImagePath(imageName) {
  20. return require(`@/static/images/${imageName}`);
  21. },
  22. getScreenHeight() {
  23. const screenHeight = window.innerHeight;
  24. return screenHeight;
  25. }
  26. }
  27. };
  28. </script>
  29. <style lang="scss" scoped>
  30. .default-page {
  31. display: flex;
  32. flex-direction: column;
  33. justify-content: center;
  34. align-items: center;
  35. height: 100vh;
  36. box-sizing: border-box;
  37. text-align: center;
  38. background-color: #fff;
  39. .mimg {
  40. height: 50%;
  41. box-sizing: border-box;
  42. width: auto;
  43. margin-bottom: 20rpx;
  44. }
  45. .mp {
  46. opacity: 1;
  47. font-size: 30rpx;
  48. font-weight: 400;
  49. line-height: 2.8rem;
  50. height: 50%;
  51. box-sizing: border-box;
  52. color: rgba(87, 146, 240, 1);
  53. text-align: center;
  54. vertical-align: top;
  55. }
  56. }
  57. @media screen and (orientation: landscape) {
  58. .default-page {
  59. flex-direction: row;
  60. .mimg {
  61. width: 50%;
  62. box-sizing: border-box;
  63. height: auto;
  64. }
  65. .mp {
  66. margin: 1rem;
  67. }
  68. }
  69. }
  70. </style>