Yansen 2 年之前
父節點
當前提交
951c301b2d
共有 46 個檔案被更改,包括 323 行新增14 行删除
  1. 二進制
      public/images/bk1/flip.png
  2. 二進制
      public/images/bk1/flower.png
  3. 二進制
      public/images/bk1/flower/花朵生长动画0001.png
  4. 二進制
      public/images/bk1/flower/花朵生长动画0003.png
  5. 二進制
      public/images/bk1/flower/花朵生长动画0005.png
  6. 二進制
      public/images/bk1/flower/花朵生长动画0007.png
  7. 二進制
      public/images/bk1/flower/花朵生长动画0009.png
  8. 二進制
      public/images/bk1/flower/花朵生长动画0011.png
  9. 二進制
      public/images/bk1/flower/花朵生长动画0013.png
  10. 二進制
      public/images/bk1/flower/花朵生长动画0015.png
  11. 二進制
      public/images/bk1/flower/花朵生长动画0017.png
  12. 二進制
      public/images/bk1/flower/花朵生长动画0019.png
  13. 二進制
      public/images/bk1/flower/花朵生长动画0021.png
  14. 二進制
      public/images/bk1/flower/花朵生长动画0023.png
  15. 二進制
      public/images/bk1/flower/花朵生长动画0025.png
  16. 二進制
      public/images/bk1/flower/花朵生长动画0027.png
  17. 二進制
      public/images/bk1/flower/花朵生长动画0029.png
  18. 二進制
      public/images/bk1/flower/花朵生长动画0031.png
  19. 二進制
      public/images/bk1/pg2/header.png
  20. 二進制
      public/images/bk1/pg2/虚线1.png
  21. 二進制
      public/images/bk1/pg2/虚线2.png
  22. 二進制
      public/images/bk1/pg2/虚线3.png
  23. 二進制
      public/images/bk1/pg2/虚线4.png
  24. 二進制
      public/images/bk1/pg2/虚线5.png
  25. 二進制
      public/images/bk1/pg2/虚线6.png
  26. 二進制
      public/images/bk1/pg2/虚线7.png
  27. 二進制
      public/images/bk1/pg2/虚线8.png
  28. 二進制
      public/images/bk1/pg3/header.png
  29. 二進制
      public/images/bk1/pg3/header1.png
  30. 二進制
      public/images/bk1/pg3/header2.png
  31. 二進制
      public/images/bk1/pg3/header3.png
  32. 二進制
      public/images/bk1/poster.png
  33. 二進制
      public/images/logo.png
  34. 二進制
      public/images/pg2/persons.png
  35. 35
    0
      src/pages/bk1/FlipIcon.vue
  36. 5
    0
      src/pages/bk1/index.vue
  37. 8
    1
      src/pages/bk1/pg1.vue
  38. 50
    1
      src/pages/bk1/pg2.vue
  39. 203
    1
      src/pages/bk1/pg3.vue
  40. 13
    0
      src/pages/bk1/useSerial.js
  41. 0
    2
      src/pages/pg1/P1.vue
  42. 0
    2
      src/pages/pg1/P2.vue
  43. 0
    2
      src/pages/pg1/P3.vue
  44. 5
    5
      src/pages/pg1/index.vue
  45. 0
    0
      src/pages/pg4/index.vue
  46. 4
    0
      src/utils/resources.js

二進制
public/images/bk1/flip.png 查看文件


二進制
public/images/bk1/flower.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0001.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0003.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0005.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0007.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0009.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0011.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0013.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0015.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0017.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0019.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0021.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0023.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0025.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0027.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0029.png 查看文件


二進制
public/images/bk1/flower/花朵生长动画0031.png 查看文件


二進制
public/images/bk1/pg2/header.png 查看文件


二進制
public/images/bk1/pg2/虚线1.png 查看文件


二進制
public/images/bk1/pg2/虚线2.png 查看文件


二進制
public/images/bk1/pg2/虚线3.png 查看文件


二進制
public/images/bk1/pg2/虚线4.png 查看文件


二進制
public/images/bk1/pg2/虚线5.png 查看文件


二進制
public/images/bk1/pg2/虚线6.png 查看文件


二進制
public/images/bk1/pg2/虚线7.png 查看文件


二進制
public/images/bk1/pg2/虚线8.png 查看文件


二進制
public/images/bk1/pg3/header.png 查看文件


二進制
public/images/bk1/pg3/header1.png 查看文件


二進制
public/images/bk1/pg3/header2.png 查看文件


二進制
public/images/bk1/pg3/header3.png 查看文件


二進制
public/images/bk1/poster.png 查看文件


二進制
public/images/logo.png 查看文件


二進制
public/images/pg2/persons.png 查看文件


+ 35
- 0
src/pages/bk1/FlipIcon.vue 查看文件

@@ -0,0 +1,35 @@
1
+<template>
2
+  <img
3
+    v-show="show"
4
+    class="flip"
5
+    src="/images/bk1/flip.png"
6
+    alt=""
7
+    @touchmove="onTouch"
8
+  >
9
+</template>
10
+
11
+<script setup>
12
+  import { ref } from 'vue';
13
+
14
+  const show = ref(true);
15
+
16
+  const onTouch = () => {
17
+    show.value = false;
18
+
19
+    const t = setTimeout(() => {
20
+      show.value = true;
21
+      clearTimeout(t);
22
+    }, 1000);
23
+  }
24
+</script>
25
+
26
+<style lang="less" scoped>
27
+.flip {
28
+  position: fixed;
29
+  z-index: 100;
30
+  bottom: 0;
31
+  right: 0;
32
+  display: block;
33
+  width: 20vw;
34
+}
35
+</style>

+ 5
- 0
src/pages/bk1/index.vue 查看文件

@@ -11,16 +11,21 @@
11 11
 
12 12
 <script setup>
13 13
 import { onMounted } from 'vue';
14
+import { useRoute } from 'vue-router';
14 15
 import GoBack from './GoBack.vue';
15 16
 import Pg1 from './pg1.vue';
16 17
 import Pg2 from './pg2.vue';
17 18
 import Pg3 from './pg3.vue';
18 19
 
20
+const { query } = useRoute();
21
+const { page = 1 } = query || {};
22
+
19 23
 onMounted(() => {
20 24
   $("#bk1").turn({
21 25
     width: '100vw',
22 26
     height: '100vh',
23 27
     display: 'single',
28
+    page,
24 29
     pages: 3
25 30
   });
26 31
 });

+ 8
- 1
src/pages/bk1/pg1.vue 查看文件

@@ -1,7 +1,12 @@
1 1
 <template>
2 2
   <div class="page pg-bg bk-pg">
3 3
     <div class="bk-pd">
4
-      <video src="/video/紫金草走向世界010.mp4" autoplay="autoplay"></video>
4
+      <video
5
+        src="/video/紫金草走向世界010.mp4"
6
+        poster="/images/bk1/poster.png"
7
+        controls="controls"
8
+        autoplay="autoplay"
9
+      />
5 10
     </div>
6 11
     <div class="bk-pd content">
7 12
       <img class="map-serial" src="/images/bk1/map/地图散开0001.png" alt="">
@@ -43,12 +48,14 @@
43 48
     </div>
44 49
 
45 50
     <Dot class="dot abs" :active="1" />
51
+    <FlipIcon />
46 52
   </div>
47 53
 </template>
48 54
 
49 55
 <script setup>
50 56
 import { onMounted, ref } from 'vue';
51 57
 import Dot from './Dot.vue';
58
+import FlipIcon from './FlipIcon.vue';
52 59
 
53 60
   // const show = ref([true]);
54 61
 

+ 50
- 1
src/pages/bk1/pg2.vue 查看文件

@@ -1,7 +1,10 @@
1 1
 <template>
2 2
   <div class="page pg-bg bk-pg2">
3 3
     <div class="content">
4
-      <img class="header-img" src="/images/bk1/pg2/header.png" alt="">
4
+      <div class="header-img">
5
+        <img src="/images/bk1/pg2/header.png" alt="">
6
+        <div id="flower" class="flower" />
7
+      </div>
5 8
       <br>
6 9
       <img class="badge-img" src="/images/bk1/pg2/badge.png" alt="">
7 10
 
@@ -16,11 +19,40 @@
16 19
     </div>
17 20
 
18 21
     <Dot class="abs dot" :active="2" />
22
+    <FlipIcon />
19 23
   </div>
20 24
 </template>
21 25
 
22 26
 <script setup>
27
+  import { onMounted } from 'vue';
23 28
   import Dot from './Dot.vue';
29
+  import FlipIcon from './FlipIcon.vue';
30
+  import useSerial from './useSerial';
31
+
32
+  const flowerImg = {
33
+    maxHeight: 11200,
34
+    height: 700,
35
+    renderHeight: 150,
36
+    percent: 150 / 700,
37
+  }
38
+
39
+  onMounted(() => {
40
+    const maxHeight = 11200;
41
+    const rawHeight = 700;
42
+    const flower = document.querySelector('#flower');
43
+    const height = flower.offsetHeight;
44
+
45
+    useSerial((t) => {
46
+      const pos = t * flowerImg.height;
47
+
48
+      const backgroundPosition = `0 -${pos * height / rawHeight}px`;
49
+      flower.style.backgroundPosition = backgroundPosition;
50
+
51
+      if (pos >= (maxHeight - rawHeight)) {
52
+        return true;
53
+      }
54
+    })
55
+  });
24 56
 </script>
25 57
 
26 58
 <style lang="less" scoped>
@@ -32,6 +64,23 @@
32 64
     .header-img {
33 65
       width: 90%;
34 66
       display: inline-block;
67
+      position: relative;
68
+
69
+      @width: 30vw;
70
+      @height: (@width / 400 * 700);
71
+
72
+      .flower {
73
+        position: absolute;
74
+        z-index: 2;
75
+        width: @width;
76
+        height: @height;
77
+        left: calc(50% - 20vw);
78
+        top: 0;
79
+        background-image: url(/images/bk1/flower.png);
80
+        background-repeat:no-repeat;
81
+        background-position: 0 0;
82
+        background-size: 100% auto;
83
+      }
35 84
     }
36 85
 
37 86
     .badge-img {

+ 203
- 1
src/pages/bk1/pg3.vue 查看文件

@@ -1,7 +1,209 @@
1 1
 <template>
2
-  <div class="page pg-bg">789</div>
2
+  <div class="page pg-bg">
3
+    <div class="header">
4
+      <img
5
+        class="header1 animate__animated animate__rotateIn"
6
+        src="/images/bk1/pg3/header1.png"
7
+        style="animation-delay: 100ms"
8
+        alt=""
9
+      >
10
+      <img
11
+        class="header2 animate__animated animate__rotateIn abs"
12
+        src="/images/bk1/pg3/header2.png"
13
+        style="animation-delay: 300ms"
14
+        alt=""
15
+      >
16
+      <img
17
+        class="header3 animate__animated animate__fadeIn"
18
+        src="/images/bk1/pg3/header3.png"
19
+        style="animation-delay: 600ms"
20
+        alt=""
21
+      >
22
+    </div>
23
+    <div class="content">
24
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 1s">
25
+        <div class="title txt right">
26
+          <strong>2014年</strong>
27
+          <img src="/images/logo.png" alt="">
28
+        </div>
29
+        <p class="txt right pr16">
30
+          我们第一次以“紫金草”的名字,来到大家身边。我们寻访丛葬地,开设“紫色的哀思”公祭网页,发放紫金草徽章,播撒和平的种子
31
+        </p>
32
+        <img class="abs line1" src="/images/bk1/pg2/虚线1.png" alt="">
33
+      </section>
34
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 2s">
35
+        <div class="title txt">
36
+          <img src="/images/logo.png" alt="">
37
+          <strong>2015年</strong>
38
+        </div>
39
+        <p class="txt pl16">
40
+          “家脉1937”家史故事征集,3000多个家史故事讲述历史
41
+        </p>
42
+        <img class="abs line2" src="/images/bk1/pg2/虚线2.png" alt="">
43
+      </section>
44
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 3s">
45
+        <div class="title txt right">
46
+          <strong>2016年</strong>
47
+          <img src="/images/logo.png" alt="">
48
+        </div>
49
+        <p class="txt right pr16">
50
+          200万人线上种植紫金草、更换紫金草头像、手写家史故事
51
+        </p>
52
+        <img class="abs line1" src="/images/bk1/pg2/虚线1.png" alt="">
53
+      </section>
54
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 4s">
55
+        <div class="title txt">
56
+          <img src="/images/logo.png" alt="">
57
+          <strong>2017年</strong>
58
+        </div>
59
+        <p class="txt pl16">
60
+          5处丛葬地,12.13公里接力骑行,让和平理念在这座经历过伤痛的城市扎根、传播
61
+        </p>
62
+        <img class="abs line2" src="/images/bk1/pg2/虚线2.png" alt="">
63
+      </section>
64
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 5s">
65
+        <div class="title txt right">
66
+          <strong>2018年</strong>
67
+          <img src="/images/logo.png" alt="">
68
+        </div>
69
+        <p class="txt right pr16">
70
+          线上紫金草活动在全球十多个城市开展,世界个各个角落,都有紫金草的身影。
71
+        </p>
72
+        <img class="abs line1" src="/images/bk1/pg2/虚线1.png" alt="">
73
+      </section>
74
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 6s">
75
+        <div class="title txt">
76
+          <img src="/images/logo.png" alt="">
77
+          <strong>2019年</strong>
78
+        </div>
79
+        <p class="txt pl16">
80
+          5处丛葬地,12.13公里接力骑行,让和平理念在这座经历过伤痛的城市扎根、传播
81
+        </p>
82
+        <img class="abs line2" src="/images/bk1/pg2/虚线2.png" alt="">
83
+      </section>
84
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 7s">
85
+        <div class="title txt right">
86
+          <strong>2020年</strong>
87
+          <img src="/images/logo.png" alt="">
88
+        </div>
89
+        <p class="txt right pr16">
90
+          紫金草行动抖音话题播放量超3000万
91
+        </p>
92
+        <img class="abs line1" src="/images/bk1/pg2/虚线1.png" alt="">
93
+      </section>
94
+      <section class="animate__animated animate__fadeInDown" style="animation-delay: 8s">
95
+        <div class="title txt">
96
+          <img src="/images/logo.png" alt="">
97
+          <strong>2021年</strong>
98
+        </div>
99
+        <p class="txt pl16">
100
+          2000多幅公益海报,承载着孩子们对历史的铭记,对和平的祈愿。
101
+        </p>
102
+        <img class="abs line99" src="/images/bk1/pg2/虚线8.png" alt="">
103
+      </section>
104
+    </div>
105
+    <Dot class="dot" :active="3" />
106
+  </div>
3 107
 </template>
4 108
 
5 109
 <script setup>
110
+import Dot from './Dot.vue';
6 111
 
7 112
 </script>
113
+
114
+<style lang="less" scoped>
115
+.header {
116
+  box-sizing: border-box;
117
+  padding: 24px;
118
+  padding-bottom: 0;
119
+
120
+  .header1 {
121
+    width: 50vw;
122
+    left: 0;
123
+  }
124
+
125
+  .header2 {
126
+    width: 36vw;
127
+    right: 5vw;
128
+    top: 5vw
129
+  }
130
+
131
+  .header3 {
132
+    margin-top: -20vw;
133
+  }
134
+}
135
+
136
+.dot {
137
+  position: fixed;
138
+  width: 100vw;
139
+  bottom: 12px;
140
+}
141
+
142
+.content {
143
+  box-sizing: border-box;
144
+  padding: 0 48px 150px;
145
+
146
+  section {
147
+    position: relative;
148
+
149
+    & + section {
150
+      margin-top: 24px;
151
+    }
152
+  }
153
+
154
+  .pr16 {
155
+    padding-right: 16px;
156
+  }
157
+
158
+  .pl16 {
159
+    padding-left: 16px;
160
+  }
161
+
162
+  p {
163
+    margin: 0;
164
+    box-sizing: border-box;
165
+    font-size: 12px;
166
+  }
167
+
168
+  .title {
169
+    & > * {
170
+      vertical-align: middle;
171
+    }
172
+
173
+    img {
174
+      display: inline-block;
175
+      width: 1em;
176
+      vertical-align: middle;
177
+    }
178
+  }
179
+
180
+  .right {
181
+    text-align: right;
182
+  }
183
+
184
+  .left {
185
+    text-align: left;
186
+  }
187
+
188
+  .line1 {
189
+    top: 20px;
190
+    right: -24px;
191
+    width: 70%;
192
+    height: calc(100% + 24px);
193
+  }
194
+
195
+  .line2 {
196
+    top: 20px;
197
+    left: -32px;
198
+    width: 70%;
199
+    height: calc(100% + 24px);
200
+  }
201
+
202
+  .line99 {
203
+    top: 20px;
204
+    left: -32px;
205
+    width: 70%;
206
+    height: calc(100% + 90px);
207
+  }
208
+}
209
+</style>

+ 13
- 0
src/pages/bk1/useSerial.js 查看文件

@@ -0,0 +1,13 @@
1
+
2
+export default function useSerial(callback) {
3
+  let times = 0;
4
+
5
+  const i = setInterval(() => {
6
+    const isOver = callback(times);
7
+    times += 1;
8
+
9
+    if (isOver) {
10
+      clearInterval(i);
11
+    }
12
+  }, 2000 / 16);
13
+}

+ 0
- 2
src/pages/pg1/P1.vue 查看文件

@@ -6,7 +6,6 @@
6 6
         style="animation-delay: 500ms"
7 7
         src="/images/pg1/earth.png"
8 8
         alt=""
9
-        @click="emit('clickImg', $event)"
10 9
       >
11 10
       <div class="back-line">
12 11
         <img src="/images/pg1/line1.png" alt="">
@@ -23,7 +22,6 @@
23 22
 </template>
24 23
 
25 24
 <script setup>
26
-const emit = defineEmits(['clickImg']);
27 25
 </script>
28 26
 
29 27
 <style lang="less" scoped>

+ 0
- 2
src/pages/pg1/P2.vue 查看文件

@@ -6,7 +6,6 @@
6 6
         style="animation-delay: 1.5s"
7 7
         src="/images/pg1/honour.png"
8 8
         alt=""
9
-        @click="emit('clickImg', $event)"
10 9
       >
11 10
       <div class="back-line">
12 11
         <img src="/images/pg1/line2.png" alt="">
@@ -23,7 +22,6 @@
23 22
 </template>
24 23
 
25 24
 <script setup>
26
-const emit = defineEmits(['clickImg']);
27 25
 </script>
28 26
 
29 27
 <style lang="less" scoped>

+ 0
- 2
src/pages/pg1/P3.vue 查看文件

@@ -6,7 +6,6 @@
6 6
         style="animation-delay: 3s"
7 7
         src="/images/pg1/peace.png"
8 8
         alt=""
9
-        @click="emit('clickImg', $event)"
10 9
       >
11 10
     </div>
12 11
     <div class="content-right txt">      
@@ -19,7 +18,6 @@
19 18
 </template>
20 19
 
21 20
 <script setup>
22
-const emit = defineEmits(['clickImg']);
23 21
 </script>
24 22
 
25 23
 <style lang="less" scoped>

+ 5
- 5
src/pages/pg1/index.vue 查看文件

@@ -5,9 +5,9 @@
5 5
         <Logo class="logo" />
6 6
       </div>
7 7
       <div class="body" parallax-offset='-100'>
8
-        <Part1 class="part1" @clickImg="onClickImg" />
9
-        <Part2 class="part2" />
10
-        <Part3 class="part3" />
8
+        <Part1 class="part1" @click="onClick(1)" />
9
+        <Part2 class="part2" @click="onClick(2)" />
10
+        <Part3 class="part3" @click="onClick(3)" />
11 11
       </div>
12 12
     </div>
13 13
     <div class="footer abs animate__animated animate__fadeInUp" style="animation-delay: 4s">
@@ -33,8 +33,8 @@
33 33
 
34 34
   const router = useRouter();
35 35
 
36
-  const onClickImg = () => {
37
-    router.push('/bk1');
36
+  const onClick = (page) => {
37
+    router.push(`/bk1?page=${page}`);
38 38
   }
39 39
 
40 40
 </script>

+ 0
- 0
src/pages/pg4/index.vue 查看文件


+ 4
- 0
src/utils/resources.js 查看文件

@@ -30,4 +30,8 @@ export const resources = [
30 30
   { image: './images/pg2/flower/1-4.png', },
31 31
   { image: './images/pg2/flower/右-小.png', },
32 32
   { image: './images/pg2/flower/左-小.png', },
33
+  { image: './images/bk1/flower/左-小.png', },
34
+  { image: './images/bk1/flip.png', },
35
+  { image: './images/bk1/flower.png', },
36
+  { image: './images/bk1/goback.png', },
33 37
 ];