index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <div class="SilkRoadSpringFestivalGala">
  3. <div class="screen" v-if="page == 'first'">
  4. <div class="first">
  5. <div class="first_text">
  6. <p v-for="v in first_text_view" :key="v">
  7. <span v-for="val in v" v-text="val" :key="val"></span>
  8. </p>
  9. </div>
  10. </div>
  11. </div>
  12. <div class="screen">
  13. <transition name="fade">
  14. <second v-if="page === 'second'" @changePage="changePage" />
  15. </transition>
  16. <transition name="fade">
  17. <third v-if="page === 'third'" @changePage="changePage" />
  18. </transition>
  19. <transition name="fade">
  20. <fourth v-if="page === 'fourth'" @changePage="changePage" />
  21. </transition>
  22. <transition name="fade">
  23. <five v-if="page === 'five'" @changePage="changePage" />
  24. </transition>
  25. <transition name="fade">
  26. <sex v-if="page === 'sex'" />
  27. </transition>
  28. </div>
  29. </div>
  30. </template>
  31. <script setup>
  32. import third from "./pages/third.vue";
  33. import second from "./pages/second.vue";
  34. import fourth from "./pages/fourth.vue";
  35. import five from "./pages/five.vue";
  36. import sex from "./pages/sex.vue";
  37. // import { onMounted, reactive } from "vue";
  38. import { ref } from "vue";
  39. // import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
  40. /**
  41. * window.$originData.orginParames.title 页面标题
  42. * window.$originData.orginParames.parameters 固定参数值
  43. * window.$originData.urlParames url参数
  44. */
  45. console.log(window.$originData);
  46. const page = ref("second");
  47. // let first_text = ['"大美中国·多彩丝路"', "2023丝路春晚 联名限定"];
  48. // for (let i = 0; i < first_text.length; i++) {
  49. // first_text[i] = first_text[i].split("");
  50. // }
  51. // const first_text_view = reactive(first_text);
  52. // let time = setTimeout(() => {
  53. // clearTimeout(time);
  54. // page.value = "second";
  55. // }, 5000);
  56. function changePage(type) {
  57. page.value = type;
  58. }
  59. </script>
  60. <style lang="scss" scoped>
  61. .SilkRoadSpringFestivalGala {
  62. width: 100vw;
  63. height: 100vh;
  64. overflow: hidden;
  65. font-weight: 400;
  66. .screen {
  67. width: 100%;
  68. height: 100%;
  69. background-color: #000000;
  70. > div {
  71. height: 100%;
  72. width: 100%;
  73. transition: all 2s;
  74. }
  75. .fade-enter-from,
  76. .fade-leave-to {
  77. opacity: 0;
  78. }
  79. .fade-enter-active,
  80. .fade-leave-active {
  81. transition: opacity 1s ease;
  82. }
  83. .fade-enter-to,
  84. .fade-leave-from {
  85. opacity: 1;
  86. }
  87. }
  88. .first {
  89. background-color: #000000;
  90. position: relative;
  91. transition: all 5s;
  92. opacity: 1;
  93. .first_text {
  94. position: absolute;
  95. top: 50%;
  96. left: 50%;
  97. width: 100%;
  98. transform: translate(-50%, -50%);
  99. color: #ffffff;
  100. text-align: center;
  101. letter-spacing: 0.2rem;
  102. font-size: 1.2rem;
  103. font-family: Lato, serif;
  104. text-transform: uppercase;
  105. p {
  106. margin-top: 5px;
  107. span {
  108. animation: rainbow 50s alternate infinite forwards;
  109. }
  110. }
  111. }
  112. }
  113. }
  114. @keyframes rainbow {
  115. @for $i from 0 through 20 {
  116. #{percentage($i * 0.05)} {
  117. color: hsl(random(360%), 75, 75);
  118. }
  119. }
  120. }
  121. @keyframes star {
  122. 0% {
  123. width: 15px;
  124. height: 15px;
  125. }
  126. 50% {
  127. width: 35px;
  128. height: 35px;
  129. }
  130. 100% {
  131. width: 15px;
  132. height: 15px;
  133. }
  134. }
  135. </style>