index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. const page = ref("second");
  46. // let first_text = ['"大美中国·多彩丝路"', "2023丝路春晚 联名限定"];
  47. // for (let i = 0; i < first_text.length; i++) {
  48. // first_text[i] = first_text[i].split("");
  49. // }
  50. // const first_text_view = reactive(first_text);
  51. // let time = setTimeout(() => {
  52. // clearTimeout(time);
  53. // page.value = "second";
  54. // }, 5000);
  55. function changePage(type) {
  56. page.value = type;
  57. }
  58. </script>
  59. <style lang="scss" scoped>
  60. .SilkRoadSpringFestivalGala {
  61. width: 100vw;
  62. height: 100vh;
  63. overflow: hidden;
  64. font-weight: 400;
  65. .screen {
  66. width: 100%;
  67. height: 100%;
  68. background-color: #000000;
  69. > div {
  70. height: 100%;
  71. width: 100%;
  72. transition: all 2s;
  73. }
  74. .fade-enter-from,
  75. .fade-leave-to {
  76. opacity: 0;
  77. }
  78. .fade-enter-active,
  79. .fade-leave-active {
  80. transition: opacity 1s ease;
  81. }
  82. .fade-enter-to,
  83. .fade-leave-from {
  84. opacity: 1;
  85. }
  86. }
  87. .first {
  88. background-color: #000000;
  89. position: relative;
  90. transition: all 5s;
  91. opacity: 1;
  92. .first_text {
  93. position: absolute;
  94. top: 50%;
  95. left: 50%;
  96. width: 100%;
  97. transform: translate(-50%, -50%);
  98. color: #ffffff;
  99. text-align: center;
  100. letter-spacing: 0.2rem;
  101. font-size: 1.2rem;
  102. font-family: Lato, serif;
  103. text-transform: uppercase;
  104. p {
  105. margin-top: 5px;
  106. span {
  107. animation: rainbow 50s alternate infinite forwards;
  108. }
  109. }
  110. }
  111. }
  112. }
  113. @keyframes rainbow {
  114. @for $i from 0 through 20 {
  115. #{percentage($i * 0.05)} {
  116. color: hsl(random(360%), 75, 75);
  117. }
  118. }
  119. }
  120. </style>