index.vue 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <template>
  2. <div class="page pg-bg pg3" ref="pgRef">
  3. <div class="pg3-bg">
  4. <div>
  5. <img class="bg-left abs" src="/images/pg3/left-bg.png" alt="">
  6. <img class="bg-right abs" src="/images/pg3/right-bg.png" alt="">
  7. </div>
  8. </div>
  9. <Animate
  10. class="header"
  11. name="animate__zoomIn"
  12. delay="100ms"
  13. :ready="show"
  14. >
  15. <p class="txt" style="text-align:center">
  16. 向<br />世<br />界<br />讲<br />述
  17. </p>
  18. </Animate>
  19. <div class="nanjing">
  20. <div>
  21. <Animate
  22. comp="img"
  23. src="/images/pg3/nan.png"
  24. name="animate__zoomIn"
  25. delay="100ms"
  26. :ready="show"
  27. />
  28. <Animate
  29. comp="img"
  30. class="stele abs animate__slow"
  31. src="/images/pg3/stele.png"
  32. name="animate__fadeInUp"
  33. delay="100ms"
  34. :ready="show"
  35. />
  36. </div>
  37. <div>
  38. <Animate
  39. comp="img"
  40. src="/images/pg3/jing.png"
  41. name="animate__zoomIn"
  42. delay="500ms"
  43. alt=""
  44. :ready="show"
  45. />
  46. </div>
  47. </div>
  48. <Animate
  49. class="nj-1937"
  50. comp="img"
  51. src="/images/pg3/1937.png"
  52. name="animate__zoomIn"
  53. delay="500ms"
  54. alt=""
  55. :ready="show"
  56. />
  57. <div class="content">
  58. <Animate
  59. class="txt"
  60. comp="p"
  61. name="animate__fadeInDown"
  62. delay="1s"
  63. :ready="show"
  64. >
  65. 如同“紫金草行动”,我们的身边有很多人,用自己的方式向世界讲述1937,他们不同年龄、不同肤色、不同国家、不同职业,但他们讲述的是全人类共同的心愿。
  66. </Animate>
  67. </div>
  68. <Splide
  69. :options="slideOptions"
  70. :has-track="false"
  71. @splide:moved="onSlideChange"
  72. >
  73. <div class="ink-slider-wrapper">
  74. <SplideTrack>
  75. <SplideSlide>
  76. <Ink class="slide-ink" :active="slideIndexRef == 0" src="./images/pg3/1.png" />
  77. </SplideSlide>
  78. <SplideSlide>
  79. <Ink class="slide-ink" :active="slideIndexRef == 1" src="./images/pg3/2.png" />
  80. </SplideSlide>
  81. <SplideSlide>
  82. <Ink class="slide-ink" :active="slideIndexRef == 2" src="./images/pg3/3.png" />
  83. </SplideSlide>
  84. <SplideSlide>
  85. <Ink class="slide-ink" :active="slideIndexRef == 3" src="./images/pg3/4.png" />
  86. </SplideSlide>
  87. <SplideSlide>
  88. <Ink class="slide-ink" :active="slideIndexRef == 4" src="./images/pg3/5.png" />
  89. </SplideSlide>
  90. </SplideTrack>
  91. <div class="splide__arrows abs" style="left: 0; top: 0">
  92. <div class="splide__arrow splide__arrow--prev">
  93. <img src="/images/pg3/arrow.png" alt="" style="transform: rotate(180deg)">
  94. </div>
  95. </div>
  96. <div class="splide__arrows abs" style="right: 0; top: 0">
  97. <div class="splide__arrow splide__arrow--next">
  98. <img src="/images/pg3/arrow.png" alt="">
  99. </div>
  100. </div>
  101. </div>
  102. </Splide >
  103. <div class="btn-box">
  104. <img src="/images/pg3/btn.png" alt="" @click="onBtnClick">
  105. </div>
  106. <!-- <Persons v-if="showPerson" @cancel="showPerson = false" /> -->
  107. </div>
  108. </template>
  109. <script setup>
  110. import { onBeforeUnmount, onMounted, ref } from 'vue';
  111. import { useRouter } from 'vue-router';
  112. import { Splide, SplideSlide, SplideTrack } from '@splidejs/vue-splide';
  113. import Bell from '@/components/Bell.vue';
  114. import Btn from '@/components/Btn.vue';
  115. import Animate from '@/components/Animate.vue';
  116. // import Persons from './Persons.vue';
  117. import Ink from './Ink.vue';
  118. import usePageShow from '../usePageShow';
  119. const router = useRouter();
  120. const [pgRef, show] = usePageShow(0.3);
  121. const showPerson = ref(false);
  122. const slideIndexRef = ref(0);
  123. const slideOptions = {
  124. // arrows: false,
  125. pagination: false,
  126. autoplay: true,
  127. type: 'loop',
  128. speed: 1000,
  129. interval: 6000,
  130. }
  131. const onVideo = () => {
  132. router.push('/pg4')
  133. }
  134. const onSlideChange = (slide, newIndex) => {
  135. slideIndexRef.value = newIndex;
  136. }
  137. const onBtnClick = () => {
  138. console.log('--------------')
  139. router.push('/pg4')
  140. }
  141. </script>
  142. <style lang="less" scoped>
  143. .pg3 {
  144. position: relative;
  145. .pg3-bg {
  146. position: absolute;
  147. z-index: 0;
  148. width: 100%;
  149. height: 100%;
  150. & > div {
  151. position: relative;
  152. height: 100%;
  153. }
  154. .bg-left {
  155. width: 40px;
  156. height: 158px;
  157. top: 30vh;
  158. left: 0;
  159. }
  160. .bg-right {
  161. width: 50px;
  162. height: 80px;
  163. top: 10vh;
  164. right: 0;
  165. }
  166. }
  167. .header {
  168. width: 30vw;
  169. margin: auto;
  170. margin-top: 30px;
  171. position: relative;
  172. }
  173. .nanjing {
  174. width: 50vw;
  175. margin: auto;
  176. display: flex;
  177. align-items: center;
  178. justify-content: space-between;
  179. & > div {
  180. position: relative;
  181. }
  182. .stele {
  183. width: 8vw;
  184. bottom: 2vw;
  185. left: 8vw;
  186. }
  187. }
  188. .nj-1937 {
  189. width: 16vw;
  190. margin: auto;
  191. }
  192. .content {
  193. width: 70vw;
  194. margin: auto;
  195. font-size: 14px;
  196. line-height: 1.2em;
  197. .txt {
  198. color: #5D4135;
  199. }
  200. }
  201. .ink-slider-wrapper {
  202. position: relative;
  203. z-index: 2;
  204. .splide__arrows {
  205. position: absolute;
  206. z-index: 10;
  207. width: 48px;
  208. height: 54.89vw;
  209. line-height: 54.89vw;
  210. text-align: center;
  211. img {
  212. width: 12px;
  213. display: inline-block;
  214. }
  215. }
  216. }
  217. .slide-ink {
  218. width: 100vw;
  219. height: 54.89vw;
  220. }
  221. .btn-box {
  222. margin-top: 2em;
  223. text-align: center;
  224. position: relative;
  225. z-index: 2;
  226. img {
  227. width: 30vw;
  228. margin: auto;
  229. }
  230. }
  231. }
  232. </style>