lisenzhou hace 2 años
padre
commit
e28ed6edaa

+ 2147
- 0
package-lock.json
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


BIN
public/images/pg2/1939年.png Ver fichero


BIN
public/images/pg2/content-bg.png Ver fichero


BIN
public/images/pg2/flower1.png Ver fichero


BIN
public/images/pg2/flower2.png Ver fichero


BIN
public/images/pg2/text1.png Ver fichero


BIN
public/images/pg2/text2.png Ver fichero


BIN
public/images/pg2/废墟.png Ver fichero


BIN
public/images/pg2/废墟color.png Ver fichero


BIN
public/images/pg2/箭头-右.png Ver fichero


BIN
public/images/pg4/beijing.png Ver fichero


BIN
public/images/pg4/播撒种子.png Ver fichero


BIN
public/images/pg4/重播.png Ver fichero


+ 158
- 97
src/pages/pg2/index.vue Ver fichero

@@ -1,13 +1,54 @@
1 1
 <template>
2 2
   <div class="page pg-bg pg2" parallax ref="pgRef">
3
-    <Cloud class="cloud abs" />
4
-    <div class="content txt">
5
-      <Animate comp="p" name="animate__lightSpeedInRight" delay="100ms" :ready="show">
6
-        1939年
7
-        <br />
8
-        <strong>一抹紫色</strong>在战争的废墟中……
9
-      </Animate>
10
-      <Animate
3
+    <div class="bg">
4
+      <div>
5
+        <!-- <img src="/images/pg2/content-bg.png" parallax-offset='200' alt="" /> -->
6
+        <Animate
7
+          comp="img"
8
+          name="animate__fadeInLeft"
9
+          src="/images/pg2/content-bg.png"
10
+          :ready="show"
11
+        />
12
+      </div>
13
+    </div>
14
+    <!-- <Cloud class="cloud abs" /> -->
15
+    <div class="content">
16
+      <div>
17
+        <Animate
18
+          class="year"
19
+          comp="img"
20
+          name="animate__fadeIn"
21
+          src="/images/pg2/1939年.png"
22
+          delay="1000ms"
23
+          :ready="show"
24
+        />
25
+        <!-- <img class="year" src="/images/pg2/1939年.png" alt="" /> -->
26
+      </div>
27
+      <!-- 1939年 -->
28
+      <div>
29
+        <!-- <img class="text1" src="/images/pg2/text1.png" alt="" /> -->
30
+        <Animate
31
+          class="text1"
32
+          comp="img"
33
+          name="animate__fadeInUp"
34
+          src="/images/pg2/text1.png"
35
+          delay="2000ms"
36
+          :ready="show"
37
+        />
38
+      </div>
39
+      <div>
40
+        <Animate
41
+          class="text2"
42
+          comp="img"
43
+          name="animate__fadeIn"
44
+          src="/images/pg2/text2.png"
45
+          delay="3000ms"
46
+          :ready="show"
47
+        />
48
+        <!-- <img class="text2" src="/images/pg2/text2.png" alt="" /> -->
49
+      </div>
50
+      <!-- </Animate> -->
51
+      <!-- <Animate
11 52
         @click="onClick"
12 53
         class="story"
13 54
         comp="img"
@@ -16,81 +57,101 @@
16 57
         src="./images/pg2/story.png"
17 58
         alt
18 59
         :ready="show"
19
-      />
20
-    </div>
21
-
22
-    <div class="hill abs">
23
-      <img class src="/images/pg2/mountain.png" alt parallax-offset="-100" />
60
+      /> -->
24 61
     </div>
25 62
 
26 63
     <div class="groups abs">
27 64
       <div>
28
-        <img class="stele" src="/images/pg2/stele.png" alt parallax-offset="-150" />
29
-        <div parallax-offset="-300">
30
-          <img class="ruins" src="/images/pg2/ruins.png" alt />
31
-          <!-- <Smoke class="smoke abs" /> -->
65
+        <div>
66
+          <img class="ruins" src="/images/pg2/废墟.png" alt />
32 67
         </div>
33
-        <img class="persons" src="/images/pg2/persons.png" alt parallax-offset="-500" />
68
+      </div>
69
+    </div>
70
+    <div class="flower1">
71
+      <div>
72
+        <img src="/images/pg2/flower1.png" alt="" />
73
+      </div>
74
+    </div>
75
+
76
+    <div class="flower2">
77
+      <div>
78
+        <img src="/images/pg2/flower2.png" alt="" />
34 79
       </div>
35 80
     </div>
36 81
 
37
-    <img class="footer abs" src="/images/pg2/footer.png" alt />
82
+    <div class="footer txt">
83
+      了解故事
84
+      <img src="/images/pg2/箭头-右.png" alt />
85
+    </div>
86
+    <!-- <img class="footer abs" src="/images/pg2/footer.png" alt /> -->
38 87
 
39
-    <div class="flower abs">
88
+    <!-- <div class="flower abs">
40 89
       <Animate class="flower1 abs" :comp="Flower1" :name="flowerAnimate.left" :ready="show" />
41 90
       <Animate class="flower2 abs" :comp="Flower2" :name="flowerAnimate.right" :ready="show" />
42 91
       <Animate class="flower3 abs" :comp="Flower3" :name="flowerAnimate.left" :ready="show" />
43
-    </div>
92
+    </div> -->
44 93
   </div>
45 94
 </template>
46 95
 
47 96
 <script setup>
48
-import { reactive, ref } from 'vue'
49
-import { useRouter } from 'vue-router'
50
-import Bell from '@/components/Bell.vue'
51
-import Animate from '@/components/Animate.vue'
52
-import Cloud from './Cloud.vue'
53
-import Smoke from './smoke.vue'
54
-import Flower1 from './flower/Flower1.vue'
55
-import Flower2 from './flower/Flower2.vue'
56
-import Flower3 from './flower/Flower3.vue'
57
-import usePageShow from '../usePageShow'
58
-
59
-const router = useRouter()
97
+import { reactive, ref } from "vue";
98
+import { useRouter } from "vue-router";
99
+import Bell from "@/components/Bell.vue";
100
+import Animate from "@/components/Animate.vue";
101
+import Cloud from "./Cloud.vue";
102
+import Smoke from "./smoke.vue";
103
+import Flower1 from "./flower/Flower1.vue";
104
+import Flower2 from "./flower/Flower2.vue";
105
+import Flower3 from "./flower/Flower3.vue";
106
+import usePageShow from "../usePageShow";
107
+
108
+const router = useRouter();
60 109
 
61 110
 const onClick = () => {
62
-  router.push(`/pg2-2`)
63
-}
111
+  router.push(`/pg2-2`);
112
+};
64 113
 
65 114
 const flowerAnimate = reactive({
66
-  left: '',
67
-  right: ''
68
-})
115
+  left: "",
116
+  right: "",
117
+});
69 118
 
70
-let lastRatio = 0
119
+let lastRatio = 0;
71 120
 const flowShow = ({ intersectionRatio }) => {
72
-  console.log(intersectionRatio)
73
-  const isIn = intersectionRatio > 0.5 && intersectionRatio > lastRatio
74
-  const isOut = intersectionRatio < 0.9 && intersectionRatio < lastRatio
121
+  console.log(intersectionRatio);
122
+  const isIn = intersectionRatio > 0.5 && intersectionRatio > lastRatio;
123
+  const isOut = intersectionRatio < 0.9 && intersectionRatio < lastRatio;
75 124
 
76 125
   if (isIn) {
77
-    flowerAnimate.left = 'animate__fadeInLeft'
78
-    flowerAnimate.right = 'animate__fadeInRight'
126
+    flowerAnimate.left = "animate__fadeInLeft";
127
+    flowerAnimate.right = "animate__fadeInRight";
79 128
   }
80 129
   if (isOut) {
81
-    flowerAnimate.left = 'animate__fadeOutLeft'
82
-    flowerAnimate.right = 'animate__fadeOutRight'
130
+    flowerAnimate.left = "animate__fadeOutLeft";
131
+    flowerAnimate.right = "animate__fadeOutRight";
83 132
   }
84 133
 
85
-  lastRatio = intersectionRatio
86
-}
134
+  lastRatio = intersectionRatio;
135
+};
87 136
 
88
-const [pgRef, show] = usePageShow(flowShow)
137
+const [pgRef, show] = usePageShow(flowShow);
89 138
 </script>
90 139
 
91 140
 <style lang="less" scoped>
92 141
 .pg2 {
93 142
   overflow: hidden;
143
+  // margin-top: -80px;
144
+  .bg {
145
+    position: absolute;
146
+    z-index: 0;
147
+    width: 50%;
148
+    // height: 100%;
149
+    left: 0;
150
+    top: 0;
151
+    & > div {
152
+      position: relative;
153
+    }
154
+  }
94 155
 
95 156
   .bell {
96 157
     top: 30px;
@@ -111,10 +172,23 @@ const [pgRef, show] = usePageShow(flowShow)
111 172
   .content {
112 173
     z-index: 10;
113 174
     width: 80vw;
114
-    margin-left: 20vw;
175
+    margin-left: 15vw;
115 176
     padding-top: 80px;
116 177
     line-height: 2em;
117 178
 
179
+    .year {
180
+      margin-top: 40px;
181
+      width: 60%;
182
+    }
183
+
184
+    .text1 {
185
+      margin-top: 30px;
186
+      width: 30%;
187
+    }
188
+    .text2 {
189
+      margin-top: 30px;
190
+      width: 60%;
191
+    }
118 192
     .story {
119 193
       margin-top: 12px;
120 194
       width: 45%;
@@ -144,62 +218,49 @@ const [pgRef, show] = usePageShow(flowShow)
144 218
       position: relative;
145 219
     }
146 220
 
147
-    .smoke {
148
-      bottom: 0;
149
-      left: 55%;
150
-      z-index: 0;
151
-      width: 100%;
152
-      background: transparent;
153
-    }
154
-
155
-    .stele {
156
-      position: absolute;
157
-      width: 40%;
158
-      right: 0;
159
-      top: -60%;
221
+    img {
222
+      filter: gray;
160 223
     }
161 224
   }
162
-
163
-  .footer {
164
-    left: 0;
165
-    bottom: 0;
166
-  }
167
-
168
-  .flower {
169
-    bottom: 0;
170
-    left: 0;
171
-    width: 100%;
172
-    height: 50vh;
173
-    z-index: 4;
174
-    overflow: hidden;
175
-  }
176
-
177 225
   .flower1 {
178
-    left: 0;
179
-    bottom: 0;
226
+    position: absolute;
227
+    z-index: 20;
228
+    width: 50%;
229
+    // height: 100%;
230
+    left: 50px;
231
+    top: 500px;
232
+    & > div {
233
+      position: relative;
234
+    }
235
+    img {
236
+      width: 50px;
237
+    }
180 238
   }
181
-
182 239
   .flower2 {
183
-    width: 20vw;
240
+    position: absolute;
241
+    z-index: 20;
242
+
243
+    // height: 100%;
184 244
     right: 0;
185
-    bottom: 0;
245
+    top: 250px;
246
+    img {
247
+      width: 80px;
248
+    }
186 249
   }
187
-
188
-  .flower3 {
189
-    width: 20vw;
190
-    left: 20vw;
250
+  .footer {
251
+    left: 0;
191 252
     bottom: 0;
192
-  }
193
-
194
-  .hill,
195
-  .wall,
196
-  .flower {
253
+    position: absolute;
254
+    width: 100%;
255
+    text-align: center;
256
+    font-size: 24px;
197 257
     img {
198
-      width: 100%;
199
-      display: block;
200
-      position: relative;
201
-      z-index: 100;
258
+      width: 15px;
259
+      height: 25px;
260
+      display: inline;
261
+      width: auto;
262
+      vertical-align: text-bottom;
202 263
     }
203 264
   }
204 265
 }
205
-</style>
266
+</style>

+ 40
- 0
src/pages/pg4/plant.vue Ver fichero

@@ -0,0 +1,40 @@
1
+<template>
2
+    <div class="page pg-bg pg4">
3
+     
4
+    </div>
5
+  </template>
6
+  
7
+  <script setup>
8
+    import { onMounted, ref, watch } from 'vue';
9
+    import { useRouter } from 'vue-router';
10
+    import Rule from './Rule.vue';
11
+    import Map from './Map.vue';
12
+    import Flower from './Flower.vue';
13
+    import Share from './Share.vue';
14
+    import Badge from './Badge.vue';
15
+  
16
+    const router = useRouter();
17
+    const countryRef = ref();
18
+    const flowerShow = ref();
19
+    const planted = ref(false);
20
+    const badgeShow = ref(false);
21
+  
22
+    const onMapClick = (country) => {
23
+      countryRef.value = country;
24
+      flowerShow.value = true;
25
+    }
26
+  
27
+    const onPlanted = () => {
28
+      planted.value = true;
29
+      flowerShow.value = false;
30
+    }
31
+  
32
+    const onShare = () => {
33
+      router.push('/share')
34
+    }
35
+  
36
+  </script>
37
+  
38
+  <style lang="less">
39
+
40
+  </style>

+ 57
- 49
src/pages/pg4/video.vue Ver fichero

@@ -1,69 +1,77 @@
1 1
 <template>
2 2
   <div class="page pg-bg video-pg">
3
-    <video
4
-      webkit-playsinline
5
-      playsinline
6
-      src="/video/和平宣言-视频-压缩.mp4"
7
-      preload="preload"
8
-      controls="controls"
9
-      ref="mediaRef"
10
-      @ended="show = true"
11
-    ></video>
12
-    <div class="play-action animate__animated animate__fadeIn" v-if="show">
13
-      <div class="btns">
14
-        <Btn front-color="#000" back-color="rgba(255,255,255, 1)" @click="onReplay">重播</Btn>
15
-        <Btn front-color="#000" back-color="rgba(255,255,255, 1)" style="margin-left: 24px" @click="onNext">下一步</Btn>
3
+    <div class="content">
4
+      <video
5
+        webkit-playsinline
6
+        playsinline
7
+        src="/video/和平宣言-视频-压缩.mp4"
8
+        preload="preload"
9
+        controls="controls"
10
+        ref="mediaRef"
11
+        @ended="show = true"
12
+      ></video>
13
+      <div class="play-action animate__animated animate__fadeIn" v-if="show">
14
+        <img src="/images/pg4/重播.png" @click="onReplay" alt="" />
15
+        <img src="/images/pg4/播撒种子.png" @click="onNext" alt="" />
16 16
       </div>
17 17
     </div>
18 18
   </div>
19 19
 </template>
20 20
 
21 21
 <script setup>
22
-  import { ref } from 'vue';
23
-  import { useRouter } from 'vue-router';
24
-  import Btn from '@/components/Btn.vue';
25
-  
26
-  const router = useRouter();
27
-  const mediaRef = ref();
28
-  const show = ref(false);
22
+import { ref } from "vue";
23
+import { useRouter } from "vue-router";
29 24
 
30
-  const onReplay = () => {
31
-    mediaRef.value.play();
32
-    show.value = false;
33
-  }
25
+const router = useRouter();
26
+const mediaRef = ref();
27
+const show = ref(false);
34 28
 
35
-  const onNext = () => {
36
-    router.push('/pg4/next')
37
-  }
29
+const onReplay = () => {
30
+  mediaRef.value.play();
31
+  show.value = false;
32
+};
33
+
34
+const onNext = () => {
35
+  router.push("/pg4/next");
36
+};
38 37
 </script>
39 38
 
40 39
 <style lang="less" scoped>
41 40
 .video-pg {
42 41
   position: relative;
43
-
44
-  video {
42
+  background-image: url("/images/pg4/beijing.png");
43
+  background-repeat: no-repeat;
44
+  background-size: 100% 100%;
45
+  display: flex;
46
+  align-items: center;
47
+  .content {
45 48
     position: relative;
46
-    width: 100%;
47
-    height: 100%;
48
-    z-index: 1;
49
-  }
50
-
51
-  .play-action {
52
-    position: absolute;
53
-    z-index: 2;
54
-    top: 0;
55
-
56
-    width: 100%;
57
-    height: 100%;
58
-    background: rgba(0, 0, 0, 0.5);
59
-
60
-    display: flex;
61
-    align-items: center;
62
-    justify-content: center;
63
-
64
-    .btns {
49
+    video {
50
+      width: 100%;
51
+      z-index: 1;
52
+    }
53
+    .play-action {
54
+      position: absolute;
55
+      z-index: 2;
56
+      bottom: -80px;
57
+      width: 100%;
58
+      height: 80px;
59
+      display: flex;
60
+      align-items: center;
61
+      justify-content: center;
65 62
 
63
+      img {
64
+        width: 100px;
65
+        width: 30vw;
66
+        height: 10vw;
67
+      }
68
+      img:first-child {
69
+        margin-right: 20px;
70
+      }
71
+      img:last-child {
72
+        margin-left: 20px;
73
+      }
66 74
     }
67 75
   }
68 76
 }
69
-</style>
77
+</style>

+ 561
- 676
yarn.lock
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero