second.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <div class="second">
  3. <div class="star">
  4. <img src="@/assets/img/star.png" class="starimg" />
  5. </div>
  6. <div :class="{swiper: true, isSelect: swiperClick}" @click="close">
  7. <div
  8. class="clickEle"
  9. :style="swiperClick ? 'margin-left: 2.1em;' : ''"
  10. ></div>
  11. </div>
  12. </div>
  13. </template>
  14. <script setup>
  15. import { ref, defineEmits } from "vue";
  16. // import { onMounted, reactive } from "vue";
  17. // import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
  18. /**
  19. * window.$originData.orginParames.title 页面标题
  20. * window.$originData.orginParames.parameters 固定参数值
  21. * window.$originData.urlParames url参数
  22. */
  23. const swiperClick = ref(false);
  24. const emits = defineEmits(["changePage"]);
  25. function close() {
  26. swiperClick.value = !swiperClick.value;
  27. let t = setTimeout(() => {
  28. clearTimeout(t);
  29. emits("changePage", "third");
  30. }, 500);
  31. }
  32. </script>
  33. <style lang="scss" scoped>
  34. .second {
  35. position: relative;
  36. background-image: url("../../../assets/img/silubg.jpg");
  37. background-size: 100% 100%;
  38. .star {
  39. position: absolute;
  40. top: 50%;
  41. right: 10vw;
  42. width: 60px;
  43. height: 60px;
  44. z-index: 1;
  45. .starimg {
  46. animation: star 3s infinite;
  47. width: 15px;
  48. height: 15px;
  49. position: absolute;
  50. top: 50%;
  51. left: 50%;
  52. transform: translate(-50%, -50%);
  53. }
  54. }
  55. .swiper {
  56. width: 4em;
  57. height: 2em;
  58. bottom: 13vh;
  59. left: 50%;
  60. transform: translateX(-50%);
  61. border-radius: 2em;
  62. line-height: 2em;
  63. position: absolute;
  64. border: 2px solid #ffffff;
  65. background-image: linear-gradient(to right, #ffffff80, #ffffff00);
  66. .clickEle {
  67. background-color: #ffffff;
  68. border-radius: 50%;
  69. transition: all 0.2s;
  70. height: 1.8em;
  71. width: 1.8em;
  72. }
  73. }
  74. .isSelect{
  75. background-color: #ffffff80;
  76. }
  77. }
  78. @keyframes star {
  79. 0% {
  80. width: 15px;
  81. height: 15px;
  82. }
  83. 50% {
  84. width: 35px;
  85. height: 35px;
  86. }
  87. 100% {
  88. width: 15px;
  89. height: 15px;
  90. }
  91. }
  92. </style>