index.vue 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <div class="page pg-bg pg1" parallax>
  3. <div class="bg">
  4. <div>
  5. <!-- <InkEffect class="ink-bg" src="/images/pg1/bg1.png" :active="true" /> -->
  6. <img src="/images/pg1/bg1.png" alt="">
  7. </div>
  8. </div>
  9. <div class="conent">
  10. <div class="header">
  11. <Logo class="logo" />
  12. </div>
  13. <div class="body" parallax-offset='-100'>
  14. <Part1 class="part1" :animate="active == 1" @click="onClick(1)" />
  15. <Part2 class="part2" :animate="active == 2" @click="onClick(2)" />
  16. <Part3 class="part3" :animate="active == 3" @click="onClick(3)" />
  17. </div>
  18. </div>
  19. <div class="footer abs animate__animated animate__fadeInUp">
  20. <img src="/images/pg1/bg2.png" alt="" parallax-offset='-200'>
  21. </div>
  22. <DownArrow />
  23. <Md1 v-if="mdActive == 1" @cancel="onCancel(1)" />
  24. <Md2 v-if="mdActive == 2" @cancel="onCancel(2)" />
  25. <Md3 v-if="mdActive == 3" @cancel="onCancel(3)" />
  26. </div>
  27. </template>
  28. <script setup>
  29. import { onMounted, ref } from 'vue';
  30. import { useRouter } from 'vue-router';
  31. import InkEffect from '@/components/InkEffect.vue';
  32. import DownArrow from '@/components/DownArrow.vue';
  33. import Logo from './Logo.vue';
  34. import Part1 from './P1.vue';
  35. import Part2 from './P2.vue';
  36. import Part3 from './P3.vue';
  37. import Md1 from './Md1.vue';
  38. import Md2 from './Md2.vue';
  39. import Md3 from './Md3.vue';
  40. const router = useRouter();
  41. const active = ref(1);
  42. const mdActive = ref(0);
  43. const onClick = (inx) => {
  44. mdActive.value = inx;
  45. }
  46. const onCancel = (inx) => {
  47. mdActive.value = 0;
  48. const next = inx + 1 > 3 ? 1 : inx + 1;
  49. active.value = next;
  50. }
  51. </script>
  52. <style lang="less" scoped>
  53. .bg {
  54. position: absolute;
  55. z-index: 0;
  56. width: 100%;
  57. height: 100%;
  58. left: 0;
  59. top: 0;
  60. & > div {
  61. position: relative;
  62. }
  63. .ink-bg {
  64. width: 100%;
  65. }
  66. }
  67. .conent {
  68. position: relative;
  69. height: 100%;
  70. box-sizing: border-box;
  71. padding: 30px;
  72. z-index: 10;
  73. .header {
  74. display: flex;
  75. justify-content: space-between;
  76. & > div {
  77. flex: none;
  78. }
  79. }
  80. .body {
  81. margin-top: 20vh;
  82. }
  83. .part2 {
  84. margin-top: 48px;
  85. }
  86. .part3 {
  87. margin-top: 40px;
  88. }
  89. }
  90. .footer {
  91. bottom: 0;
  92. left: 0;
  93. width: 100vw;
  94. z-index: 10;
  95. }
  96. </style>