|
@@ -41,18 +41,28 @@
|
41
|
41
|
:ready="show"
|
42
|
42
|
/>
|
43
|
43
|
</div>
|
44
|
|
-
|
45
|
44
|
</div>
|
46
|
45
|
|
47
|
46
|
<div class="groups abs">
|
48
|
47
|
<div>
|
49
|
|
- <InkEffect class="ink-ruins" src="./images/pg2/废墟color.png" :speed="10" :active="inkActive" :clearable="true" />
|
|
48
|
+ <InkEffect
|
|
49
|
+ class="ink-ruins"
|
|
50
|
+ src="./images/pg2/废墟color.png"
|
|
51
|
+ :speed="10"
|
|
52
|
+ :active="inkActive"
|
|
53
|
+ :clearable="true"
|
|
54
|
+ />
|
50
|
55
|
<img class="ruins" src="/images/pg2/废墟.png" alt />
|
51
|
56
|
</div>
|
52
|
57
|
</div>
|
53
|
58
|
<div class="flower1">
|
54
|
59
|
<div>
|
55
|
|
- <img :class="{'flower-fly': show}" src="/images/pg2/flower1.png" alt="" @animationend="inkActive = true" />
|
|
60
|
+ <img
|
|
61
|
+ :class="{ 'flower-fly': show }"
|
|
62
|
+ src="/images/pg2/flower1.png"
|
|
63
|
+ alt=""
|
|
64
|
+ @animationend="inkActive = true"
|
|
65
|
+ />
|
56
|
66
|
</div>
|
57
|
67
|
</div>
|
58
|
68
|
|
|
@@ -63,8 +73,10 @@
|
63
|
73
|
</div>
|
64
|
74
|
|
65
|
75
|
<div class="footer txt">
|
66
|
|
- 了解故事
|
67
|
|
- <img src="/images/pg2/箭头-右.png" alt />
|
|
76
|
+ <div @click="router.push('/pg2-2')">
|
|
77
|
+ 了解故事
|
|
78
|
+ <img src="/images/pg2/箭头-右.png" alt />
|
|
79
|
+ </div>
|
68
|
80
|
</div>
|
69
|
81
|
|
70
|
82
|
<DownArrow />
|
|
@@ -72,56 +84,56 @@
|
72
|
84
|
</template>
|
73
|
85
|
|
74
|
86
|
<script setup>
|
75
|
|
- import { reactive, ref, watch } from "vue";
|
76
|
|
- import { useRouter } from "vue-router";
|
77
|
|
- import Bell from "@/components/Bell.vue";
|
78
|
|
- import Animate from "@/components/Animate.vue";
|
79
|
|
- import InkEffect from "@/components/InkEffect.vue";
|
80
|
|
- import DownArrow from '@/components/DownArrow.vue';
|
81
|
|
- // import Cloud from "./Cloud.vue";
|
82
|
|
- // import Smoke from "./smoke.vue";
|
83
|
|
- // import Flower1 from "./flower/Flower1.vue";
|
84
|
|
- // import Flower2 from "./flower/Flower2.vue";
|
85
|
|
- // import Flower3 from "./flower/Flower3.vue";
|
86
|
|
- import usePageShow from "../usePageShow";
|
87
|
|
-
|
88
|
|
- const router = useRouter();
|
89
|
|
- const inkActive = ref(false);
|
90
|
|
-
|
91
|
|
- const onClick = () => {
|
92
|
|
- router.push(`/pg2-2`);
|
93
|
|
- };
|
94
|
|
-
|
95
|
|
- const flowerAnimate = reactive({
|
96
|
|
- left: "",
|
97
|
|
- right: "",
|
98
|
|
- });
|
99
|
|
-
|
100
|
|
- let lastRatio = 0;
|
101
|
|
- const flowShow = ({ intersectionRatio }) => {
|
102
|
|
- console.log(intersectionRatio);
|
103
|
|
- const isIn = intersectionRatio > 0.5 && intersectionRatio > lastRatio;
|
104
|
|
- const isOut = intersectionRatio < 0.9 && intersectionRatio < lastRatio;
|
105
|
|
-
|
106
|
|
- if (isIn) {
|
107
|
|
- flowerAnimate.left = "animate__fadeInLeft";
|
108
|
|
- flowerAnimate.right = "animate__fadeInRight";
|
109
|
|
- }
|
110
|
|
- if (isOut) {
|
111
|
|
- flowerAnimate.left = "animate__fadeOutLeft";
|
112
|
|
- flowerAnimate.right = "animate__fadeOutRight";
|
113
|
|
- }
|
|
87
|
+import { reactive, ref, watch } from "vue";
|
|
88
|
+import { useRouter } from "vue-router";
|
|
89
|
+import Bell from "@/components/Bell.vue";
|
|
90
|
+import Animate from "@/components/Animate.vue";
|
|
91
|
+import InkEffect from "@/components/InkEffect.vue";
|
|
92
|
+import DownArrow from "@/components/DownArrow.vue";
|
|
93
|
+// import Cloud from "./Cloud.vue";
|
|
94
|
+// import Smoke from "./smoke.vue";
|
|
95
|
+// import Flower1 from "./flower/Flower1.vue";
|
|
96
|
+// import Flower2 from "./flower/Flower2.vue";
|
|
97
|
+// import Flower3 from "./flower/Flower3.vue";
|
|
98
|
+import usePageShow from "../usePageShow";
|
114
|
99
|
|
115
|
|
- lastRatio = intersectionRatio;
|
116
|
|
- };
|
|
100
|
+const router = useRouter();
|
|
101
|
+const inkActive = ref(false);
|
117
|
102
|
|
118
|
|
- const [pgRef, show] = usePageShow(flowShow);
|
|
103
|
+const onClick = () => {
|
|
104
|
+ router.push(`/pg2-2`);
|
|
105
|
+};
|
119
|
106
|
|
120
|
|
- watch(show, (val) => {
|
121
|
|
- if (!val) {
|
122
|
|
- inkActive.value = false;
|
123
|
|
- }
|
124
|
|
- })
|
|
107
|
+const flowerAnimate = reactive({
|
|
108
|
+ left: "",
|
|
109
|
+ right: "",
|
|
110
|
+});
|
|
111
|
+
|
|
112
|
+let lastRatio = 0;
|
|
113
|
+const flowShow = ({ intersectionRatio }) => {
|
|
114
|
+ console.log(intersectionRatio);
|
|
115
|
+ const isIn = intersectionRatio > 0.5 && intersectionRatio > lastRatio;
|
|
116
|
+ const isOut = intersectionRatio < 0.9 && intersectionRatio < lastRatio;
|
|
117
|
+
|
|
118
|
+ if (isIn) {
|
|
119
|
+ flowerAnimate.left = "animate__fadeInLeft";
|
|
120
|
+ flowerAnimate.right = "animate__fadeInRight";
|
|
121
|
+ }
|
|
122
|
+ if (isOut) {
|
|
123
|
+ flowerAnimate.left = "animate__fadeOutLeft";
|
|
124
|
+ flowerAnimate.right = "animate__fadeOutRight";
|
|
125
|
+ }
|
|
126
|
+
|
|
127
|
+ lastRatio = intersectionRatio;
|
|
128
|
+};
|
|
129
|
+
|
|
130
|
+const [pgRef, show] = usePageShow(flowShow);
|
|
131
|
+
|
|
132
|
+watch(show, (val) => {
|
|
133
|
+ if (!val) {
|
|
134
|
+ inkActive.value = false;
|
|
135
|
+ }
|
|
136
|
+});
|
125
|
137
|
</script>
|
126
|
138
|
|
127
|
139
|
<style lang="less" scoped>
|
|
@@ -203,7 +215,6 @@
|
203
|
215
|
width: 50px;
|
204
|
216
|
}
|
205
|
217
|
}
|
206
|
|
-
|
207
|
218
|
|
208
|
219
|
.flower-fly {
|
209
|
220
|
transform-origin: left bottom;
|
|
@@ -242,12 +253,18 @@
|
242
|
253
|
width: 100%;
|
243
|
254
|
text-align: center;
|
244
|
255
|
font-size: 24px;
|
245
|
|
- img {
|
246
|
|
- width: 15px;
|
247
|
|
- height: 25px;
|
248
|
|
- display: inline;
|
249
|
|
- width: auto;
|
250
|
|
- vertical-align: text-bottom;
|
|
256
|
+ div {
|
|
257
|
+ display: flex;
|
|
258
|
+ justify-content: center;
|
|
259
|
+ align-items: center;
|
|
260
|
+ img {
|
|
261
|
+ width: 15px;
|
|
262
|
+ height: 25px;
|
|
263
|
+ display: inline;
|
|
264
|
+ width: auto;
|
|
265
|
+ vertical-align: text-bottom;
|
|
266
|
+ margin-left: 10px;
|
|
267
|
+ }
|
251
|
268
|
}
|
252
|
269
|
}
|
253
|
270
|
}
|