Yansen 2 years ago
parent
commit
dc5d6e8e20

+ 2
- 1225
package-lock.json
File diff suppressed because it is too large
View File


BIN
public/images/pg2-2/图层38.png View File


BIN
public/images/pg2-2/山.png View File


BIN
public/images/pg2-2/照片1.png View File


BIN
public/images/pg2-2/照片2.png View File


BIN
public/images/pg2-2/照片3.png View File


BIN
public/images/pg2-2/照片4.png View File


BIN
public/images/share.jpg View File


BIN
public/images/share1.jpg View File


BIN
public/images/电视台二维码.png View File


+ 1
- 1
src/main.js View File

14
 app.use(store);
14
 app.use(store);
15
 app.use(router);
15
 app.use(router);
16
 app.use(i18n);
16
 app.use(i18n);
17
-app.use( VueSplide );
17
+app.use(VueSplide);
18
 app.mount('#app');
18
 app.mount('#app');

+ 46
- 0
src/pages/pg2-2/Ink.vue View File

1
+<template>
2
+  <div class="ink-box">
3
+    <div>
4
+      <InkEffect class="ink-cover" :src="src" :active="active" />
5
+      <!-- <img class="ink-back" :src="src" alt="" > -->
6
+    </div>
7
+  </div>
8
+</template>
9
+
10
+<script setup>
11
+  import InkEffect from '@/components/InkEffect.vue';
12
+  const props = defineProps({
13
+    src: String,
14
+    active: Boolean,
15
+  })
16
+</script>
17
+
18
+<style lang="less" scoped>
19
+.ink-box {
20
+  width: 100%;
21
+  height: 100%;
22
+
23
+  & > div {
24
+    position: relative;
25
+    width: 100%;
26
+    height: 100%;
27
+
28
+    .ink-cover {
29
+      position: absolute;
30
+      width: 100%;
31
+      height: 100%;
32
+      top: 0;
33
+      left: 0;
34
+    }
35
+
36
+    .ink-back {
37
+      display: none;
38
+    }
39
+
40
+    img {
41
+      width: 100%;
42
+      height: 100%;
43
+    }
44
+  }
45
+}
46
+</style>

+ 185
- 22
src/pages/pg2-2/index.vue View File

3
     <div class="bk-pd content">
3
     <div class="bk-pd content">
4
       <p class="txt">
4
       <p class="txt">
5
         85年前,
5
         85年前,
6
-        <br />日本侵略者制造了惨绝人寰的南京大屠杀,
7
-        <br />30多万生灵涂炭。
6
+        <br />日本侵略者制造了惨绝人寰的南京大屠杀, <br />30多万生灵涂炭。
8
         <br />战后的紫金山废墟下,片片紫色小花密密开放。
7
         <br />战后的紫金山废墟下,片片紫色小花密密开放。
9
         <br />
8
         <br />
9
+        <br />
10
       </p>
10
       </p>
11
     </div>
11
     </div>
12
     <div class="bk-pd content">
12
     <div class="bk-pd content">
13
+      <img class="layer-img" src="/images/pg2-2/图层38.png" />
14
+    </div>
15
+    <div class="bk-pd content">
16
+      <img class="mountain-img" src="/images/pg2-2/山.png" />
13
       <img class="group-img" src="/images/pg2-2/组4.png" />
17
       <img class="group-img" src="/images/pg2-2/组4.png" />
14
     </div>
18
     </div>
15
     <div class="bk-pd content">
19
     <div class="bk-pd content">
16
       <p class="txt bottom">
20
       <p class="txt bottom">
17
         1939年,一名日本带军医着对战争的反思和忏悔,
21
         1939年,一名日本带军医着对战争的反思和忏悔,
18
         <br />把取自南京的花种带回日本,撒遍山野、植满庭院,
22
         <br />把取自南京的花种带回日本,撒遍山野、植满庭院,
19
-        <br />并取名“紫金草”。
20
-        <br />在他的眼中,当年的紫金山上,
23
+        <br />并取名“紫金草”。 <br />在他的眼中,当年的紫金山上,
21
         <br />每一朵花就是一个在战争中丧生的灵魂。
24
         <br />每一朵花就是一个在战争中丧生的灵魂。
22
-        <br />此后几十年,这名军医和家人
23
-        <br />在各地播种紫金草悼念亡灵,
25
+        <br />此后几十年,这名军医和家人 <br />在各地播种紫金草悼念亡灵,
24
       </p>
26
       </p>
25
     </div>
27
     </div>
26
-    <div class="bk-pd content">
27
-      <img class="photo-img" src="/images/pg2-2/照片4.png" />
28
-    </div>
28
+    <!-- <div class="bk-pd content-ink"> -->
29
+    <!-- <InkEffect src="./images/pg2-2/紫金草行动logo拷贝.png" :active="inkActive" /> -->
30
+    
31
+    <Splide
32
+      :options="slideOptions"
33
+      :has-track="false"
34
+      @splide:moved="onSlideChange"
35
+    >
36
+      <div class="ink-slider-wrapper">
37
+        <SplideTrack>
38
+          <SplideSlide>
39
+        
40
+            <Ink
41
+              class="slide-ink"
42
+              :active="slideIndexRef == 0"
43
+              src="/images/pg2-2/照片1.png"
44
+            />
45
+          </SplideSlide>
46
+          <SplideSlide>
47
+            <Ink
48
+              class="slide-ink"
49
+              :active="slideIndexRef == 1"
50
+              src="/images/pg2-2/照片2.png"
51
+            />
52
+          </SplideSlide>
53
+          <SplideSlide>
54
+            <Ink
55
+              class="slide-ink"
56
+              :active="slideIndexRef == 2"
57
+              src="/images/pg2-2/照片3.png"
58
+            />
59
+          </SplideSlide>
60
+          <SplideSlide>
61
+            <Ink
62
+              class="slide-ink"
63
+              :active="slideIndexRef == 3"
64
+              src="/images/pg2-2/照片4.png"
65
+            />
66
+          </SplideSlide>
67
+        </SplideTrack>
68
+        <div class="splide__arrows abs" style="left: 0; top: 0">
69
+          <div class="splide__arrow splide__arrow--prev">
70
+            <img
71
+              src="/images/pg3/arrow.png"
72
+              alt=""
73
+              style="transform: rotate(180deg)"
74
+            />
75
+          </div>
76
+        </div>
77
+        <div class="splide__arrows abs" style="right: 0; top: 0">
78
+          <div class="splide__arrow splide__arrow--next">
79
+            <img src="/images/pg3/arrow.png" alt="" />
80
+          </div>
81
+        </div>
82
+      </div>
83
+    </Splide>
84
+    <!-- <img class="photo-img" src="/images/pg2-2/照片4.png" /> -->
85
+    <!-- </div> -->
86
+
29
     <div class="bk-pd content">
87
     <div class="bk-pd content">
30
       <p class="txt bottom">
88
       <p class="txt bottom">
31
         紫金草,它耐寒、耐旱,
89
         紫金草,它耐寒、耐旱,
32
-        <br />在贫瘠的土地上也能顽强生长,
33
-        <br />蕴含着无穷的草根力量,
34
-        <br />寄托了对战争的反省和对和平的祈愿。
35
-        <br />“紫金草行动”由此而来。
36
-        <br />小小紫金草,悠悠寄哀思。
37
-        <br />让和平中长大的年轻人保持“痛”感,
90
+        <br />在贫瘠的土地上也能顽强生长, <br />蕴含着无穷的草根力量,
91
+        <br />寄托了对战争的反省和对和平的祈愿。 <br />“紫金草行动”由此而来。
92
+        <br />小小紫金草,悠悠寄哀思。 <br />让和平中长大的年轻人保持“痛”感,
38
         <br />让更多的人主动追问、不断提起那段历史,
93
         <br />让更多的人主动追问、不断提起那段历史,
39
-        <br />让和平之声传向世界各地,
40
-        <br />这一直是“紫金草行动”努力的方向。
94
+        <br />让和平之声传向世界各地, <br />这一直是“紫金草行动”努力的方向。
41
       </p>
95
       </p>
42
     </div>
96
     </div>
43
     <div class="bk-pd content">
97
     <div class="bk-pd content">
48
         2014年,在国家首个公祭日来临之际,
102
         2014年,在国家首个公祭日来临之际,
49
         <br />为了深切缅怀惨遭日军屠戮遇难同胞,
103
         <br />为了深切缅怀惨遭日军屠戮遇难同胞,
50
         <br />唤起人们对和平的向往和珍视,
104
         <br />唤起人们对和平的向往和珍视,
51
-        <br />南京广播电视集团发起了“紫金草行动”。
52
-        <br />九年了,
53
-        <br />“紫金草行动”再启航,
54
-        <br />让“和平之花”开得更远!
105
+        <br />南京广播电视集团发起了“紫金草行动”。 <br />九年了,
106
+        <br />“紫金草行动”再启航, <br />让“和平之花”开得更远!
55
       </p>
107
       </p>
56
     </div>
108
     </div>
57
     <div class="bk-pd content">
109
     <div class="bk-pd content">
60
   </div>
112
   </div>
61
 </template>
113
 </template>
62
 
114
 
115
+<script setup>
116
+import { onBeforeUnmount, onMounted, ref } from "vue";
117
+import { Splide, SplideSlide, SplideTrack } from '@splidejs/vue-splide';
118
+import Bell from '@/components/Bell.vue';
119
+  import Btn from '@/components/Btn.vue';
120
+  import Animate from '@/components/Animate.vue';
121
+
122
+import Ink from "./Ink.vue";
123
+const inkActive = ref(false);
124
+const slideIndexRef = ref(0);
125
+
126
+const slideOptions = {
127
+  // arrows: false,
128
+  pagination: false,
129
+  autoplay: true,
130
+  type: "loop",
131
+  speed: 1000,
132
+  interval: 6000,
133
+};
134
+
135
+const onSlideChange = (slide, newIndex) => {
136
+  slideIndexRef.value = newIndex;
137
+};
138
+</script>
139
+
63
 <style lang="less" scoped>
140
 <style lang="less" scoped>
64
 .pg2-2 {
141
 .pg2-2 {
142
+  position: relative;
143
+  height: 100vh;
65
   .content {
144
   .content {
66
     text-align: center;
145
     text-align: center;
67
   }
146
   }
68
   .content {
147
   .content {
148
+    .layer-img {
149
+      z-index: 0;
150
+      width: 14%;
151
+      display: inline-block;
152
+      position: absolute;
153
+      top: 220px;
154
+      left: 35px;
155
+      animation: layer-img 1.2s linear alternate;
156
+    }
157
+    @keyframes layer-img {
158
+      from {
159
+        opacity: 0;
160
+        transform: translateY(-40px);
161
+      }
162
+      to {
163
+        opacity: 1;
164
+        transform: translateY(0);
165
+      }
166
+    }
167
+  }
168
+  .content {
169
+    .mountain-img {
170
+      z-index: 0;
171
+      position: absolute;
172
+      top: 115px;
173
+      margin-top: 20px;
174
+      margin-left: 20px;
175
+      width: 95%;
176
+      animation: mountain-img 3s 1;
177
+    }
178
+    @keyframes mountain-img {
179
+      0% {
180
+        opacity: 0;
181
+      }
182
+      100% {
183
+        opacity: 1;
184
+      }
185
+    }
186
+
69
     .group-img {
187
     .group-img {
188
+      z-index: 10;
189
+      width: 84%;
190
+      position: relative;
191
+      margin-top: 70px;
192
+      margin-left: -16%;
70
       display: inline-block;
193
       display: inline-block;
194
+      animation-delay: 3s;
195
+      animation: group-img 1.8s linear;
196
+    }
197
+    @keyframes group-img {
198
+      0% {
199
+        transform: translateX(-100%);
200
+      }
201
+      50% {
202
+        transform: translateX(-50%);
203
+      }
204
+      100% {
205
+        transform: translateX(0);
206
+      }
71
     }
207
     }
72
   }
208
   }
73
   .content {
209
   .content {
99
       display: inline-block;
235
       display: inline-block;
100
     }
236
     }
101
   }
237
   }
238
+
239
+  .content-ink {
240
+  }
241
+  .ink-slider-wrapper {
242
+    position: relative;
243
+    z-index: 2;
244
+    .slide-ink {
245
+    width: 100vw;
246
+    height: 71.76vw;
247
+  }
248
+    .splide__arrows {
249
+      position: absolute;
250
+      z-index: 10;
251
+      width: 48px;
252
+      height: 71.76vw;
253
+      line-height: 71.76vw;
254
+      text-align: center;
255
+
256
+      img {
257
+        width: 12px;
258
+        display: inline-block;
259
+      }
260
+    }
261
+  }
262
+ 
102
 }
263
 }
103
 .txt {
264
 .txt {
104
   text-align: center;
265
   text-align: center;
266
+  font-size: 0.9em;
267
+  font-weight: 400;
105
 }
268
 }
106
-</style>
269
+</style>

+ 7
- 1
src/pages/pg4/Share.vue View File

4
       <img src="/images/pg4/btn_share.png" alt="" @click="emit('share')">
4
       <img src="/images/pg4/btn_share.png" alt="" @click="emit('share')">
5
       <img src="/images/pg4/btn_badge.png" alt="" @click="emit('badge')">
5
       <img src="/images/pg4/btn_badge.png" alt="" @click="emit('badge')">
6
     </div>
6
     </div>
7
+<<<<<<< HEAD
7
     <div class="share-txt txt">
8
     <div class="share-txt txt">
8
       目前总种植数量: {{user.num}}
9
       目前总种植数量: {{user.num}}
9
     </div>
10
     </div>
11
+=======
12
+    <!-- <div class="share-txt txt">
13
+      目前总种植数量: 35896690
14
+    </div> -->
15
+>>>>>>> f53b432b2d3c7347c2e754fdcb77bb2d3b53ed34
10
   </div>
16
   </div>
11
 </template>
17
 </template>
12
 
18
 
20
 
26
 
21
 <style lang="less" scoped>
27
 <style lang="less" scoped>
22
 .share-wrapper {
28
 .share-wrapper {
23
-  background-image: linear-gradient(transparent, #EDEEF0 40%, #EDEEF0);
29
+  // background-image: linear-gradient(transparent, #EDEEF0 40%, #EDEEF0);
24
   box-sizing: border-box;
30
   box-sizing: border-box;
25
   padding: 10px 1em;
31
   padding: 10px 1em;
26
   width: 100%;
32
   width: 100%;

+ 19
- 10
src/pages/pg4/plant.vue View File

1
 <template>
1
 <template>
2
   <div class="page pg-bg pgplant">
2
   <div class="page pg-bg pgplant">
3
+    <Rule />
3
     <GoBack class="goback abs" @click.stop="router.go(-1)" />
4
     <GoBack class="goback abs" @click.stop="router.go(-1)" />
4
     <div class="content">
5
     <div class="content">
5
       <div class="content-item" v-for="(item, inx) in list" :key="inx">
6
       <div class="content-item" v-for="(item, inx) in list" :key="inx">
27
         </div>
28
         </div>
28
       </div>
29
       </div>
29
     </div>
30
     </div>
30
-
31
+    <Share
32
+      v-if="planted"
33
+      class="share"
34
+      @share="onShare"
35
+      @badge="badgeShow = true"
36
+    />
37
+    <Badge :show="badgeShow" @cancel="badgeShow = false" />
31
     <div class="footer txt">目前总种植数量:{{ user?.num }}</div>
38
     <div class="footer txt">目前总种植数量:{{ user?.num }}</div>
32
   </div>
39
   </div>
33
 </template>
40
 </template>
37
 import GoBack from "@/components/GoBack.vue";
44
 import GoBack from "@/components/GoBack.vue";
38
 import { useRouter } from "vue-router";
45
 import { useRouter } from "vue-router";
39
 import { useModel } from "@zjxpcyc/vue-tiny-store";
46
 import { useModel } from "@zjxpcyc/vue-tiny-store";
40
-// import animate from "@/utils/animate"
47
+import Share from "./Share.vue";
48
+import Badge from "./Badge.vue";
49
+import Rule from "./Rule.vue";
41
 
50
 
42
 const { user, contries, updateContries } = useModel("user");
51
 const { user, contries, updateContries } = useModel("user");
43
 
52
 
44
 const router = useRouter();
53
 const router = useRouter();
45
 const choise = ref([]);
54
 const choise = ref([]);
46
-const countryRef = ref();
47
-const flowerShow = ref();
48
-const planted = ref(false);
55
+const planted = ref(true);
49
 const badgeShow = ref(false);
56
 const badgeShow = ref(false);
50
 
57
 
51
-let timer = "timer";
52
-
53
 const animate = (plus, e) => {
58
 const animate = (plus, e) => {
54
-  // var _this = this;
55
-  console.log(e, "==");
56
-
57
   var n = 1;
59
   var n = 1;
58
   var $i = $("<b/>").text("+" + n);
60
   var $i = $("<b/>").text("+" + n);
59
   var x = e.pageX,
61
   var x = e.pageX,
88
   //   console.log(name, "==--");
90
   //   console.log(name, "==--");
89
   return choise.value?.filter((x) => x === name)?.length > 0;
91
   return choise.value?.filter((x) => x === name)?.length > 0;
90
 };
92
 };
93
+const onPlanted = () => {
94
+  planted.value = true;
95
+  flowerShow.value = false;
96
+};
91
 
97
 
98
+const onShare = () => {
99
+  router.push("/share");
100
+};
92
 const click = (item, e) => {
101
 const click = (item, e) => {
93
   const arr = choise.value;
102
   const arr = choise.value;
94
   updateContries(item.name);
103
   updateContries(item.name);

+ 1
- 1
src/pages/pg4/video.vue View File

36
   };
36
   };
37
 
37
 
38
   const onNext = () => {
38
   const onNext = () => {
39
-    router.push("/pg4/next");
39
+    router.push("/pg4/plant");
40
   };
40
   };
41
 
41
 
42
   onMounted(() => {
42
   onMounted(() => {

+ 19
- 13
src/pages/share/index.vue View File

1
 <template>
1
 <template>
2
   <div class="share-pg">
2
   <div class="share-pg">
3
     <div class="will-copy" ref="src">
3
     <div class="will-copy" ref="src">
4
-      <img class="copy-img" src="/images/share.jpg" alt="">
4
+      <img class="copy-img" src="/images/share.jpg" alt="" />
5
       <div class="content txt">
5
       <div class="content txt">
6
-        <div class="name">昵称</div>
7
-        <div style="line-height: 1.6em">您是第123225位“紫金草行动”参与者。播撒紫金草种子,让和平之花开满全城。</div>
6
+        <div class="name">{{ user.nickname || "朋友" }}</div>
7
+        <div style="line-height: 1.6em">
8
+          您是第{{user.num}}位“紫金草行动”参与者。播撒紫金草种子,让和平之花开满全城。
9
+        </div>
8
       </div>
10
       </div>
9
     </div>
11
     </div>
10
-    <img class="img-target" :src="imgData" v-if="imgData" alt="">
12
+    <img class="img-target" :src="imgData" v-if="imgData" alt="" />
11
   </div>
13
   </div>
12
 </template>
14
 </template>
13
 
15
 
14
 <script setup>
16
 <script setup>
15
-  import { onMounted, ref } from 'vue';
16
-  import html2canvas from 'html2canvas';
17
+import { onMounted,watch, ref } from "vue";
18
+import html2canvas from "html2canvas";
19
+import { useModel } from "@zjxpcyc/vue-tiny-store";
17
 
20
 
18
-  const imgData = ref();
19
-  const src = ref();
21
+const { user } = useModel("user");
22
+const imgData = ref();
23
+const src = ref();
20
 
24
 
21
-  onMounted(() => {
25
+
26
+onMounted(() => {
27
+  setTimeout(()=>{
22
     html2canvas(src.value).then((canvas) => {
28
     html2canvas(src.value).then((canvas) => {
23
-      imgData.value = canvas.toDataURL('image/jpg', .8);
24
-    });
29
+    imgData.value = canvas.toDataURL("image/jpg", 0.8);
25
   });
30
   });
26
-
31
+  },1000)
32
+});
27
 </script>
33
 </script>
28
 
34
 
29
 <style lang="less" scoped>
35
 <style lang="less" scoped>
63
     left: 0;
69
     left: 0;
64
   }
70
   }
65
 }
71
 }
66
-</style>
72
+</style>

+ 1
- 1
src/store/index.js View File

34
 
34
 
35
 
35
 
36
 const useUser = () => {
36
 const useUser = () => {
37
-  const user = ref({num:66699});
37
+  const user = ref({});
38
 
38
 
39
   const setUser = v => user.value = v;
39
   const setUser = v => user.value = v;
40
 
40