Yansen 2 lat temu
rodzic
commit
15d8db57d4

+ 2
- 1
public/config.js Wyświetl plik

@@ -9,4 +9,5 @@ const shareOptTpl = {
9 9
 const link1URL = 'http://h5.njyunzhi.com/wenhua818-2/index.html';
10 10
 
11 11
 // 分享接口地址
12
-const API_BASE = 'http://test-h5.njyunzhi.com/api/wx/jsapi';
12
+// const API_BASE = 'http://api.h5.zijincao.njyunzhi.com';
13
+const API_BASE = '';

BIN
public/images/pg1/bg1.png Wyświetl plik


BIN
public/images/pg1/bg2.png Wyświetl plik


BIN
public/images/pg1/earth.png Wyświetl plik


BIN
public/images/pg1/honour.png Wyświetl plik


BIN
public/images/pg1/light-2.png Wyświetl plik


BIN
public/images/pg1/light.png Wyświetl plik


BIN
public/images/pg1/line1.png Wyświetl plik


BIN
public/images/pg1/line2.png Wyświetl plik


BIN
public/images/pg1/peace.png Wyświetl plik


BIN
public/images/pg1/stele.png Wyświetl plik


BIN
public/images/pg1/stele2.png Wyświetl plik


BIN
public/images/pg1/stele3.png Wyświetl plik


BIN
public/images/pg1/wall.png Wyświetl plik


BIN
public/images/广电logo.png Wyświetl plik


+ 3
- 3
src/App.vue Wyświetl plik

@@ -3,7 +3,7 @@
3 3
   import { useModel } from '@zjxpcyc/vue-tiny-store';
4 4
   import wxsdk from '@/utils/wx'
5 5
   import track from '@/utils/track'
6
-  import Loading from './pages/Loading.vue';
6
+  import Loading from './First.vue';
7 7
 
8 8
   const { el } = useModel('audio');
9 9
   const { setUser } = useModel('user');
@@ -38,8 +38,8 @@
38 38
 </script>
39 39
 
40 40
 <template>
41
-  <Loading v-if="!show" class="loading" @ready="(show = true)" />
42
-  <router-view v-else></router-view>
41
+  <!-- <Loading v-if="!show" class="loading" @ready="(show = true)" /> -->
42
+  <router-view></router-view>
43 43
 
44 44
   <audio ref="el" src="/audio/audio.mp3" style="max-width: 0"  preload="auto"></audio>
45 45
 </template>

+ 55
- 0
src/First.vue Wyświetl plik

@@ -0,0 +1,55 @@
1
+<template>
2
+  <div class="page first-pg">
3
+    <video
4
+      ref="el"
5
+      webkit-playsinline
6
+      playsinline
7
+      preload="auto"
8
+      autoplay="autoplay"
9
+      loop="loop"
10
+      x5-video-player-type="h5"
11
+      id="firstVideo"
12
+      src="/video/和平宣言-视频-压缩.mp4"
13
+    ></video>
14
+  </div>
15
+</template>
16
+
17
+<script setup>
18
+  import { onMounted, ref } from 'vue';
19
+
20
+  const el = ref();
21
+
22
+  onMounted(() => {
23
+    const ua = navigator.userAgent;
24
+    if (ua.toLowerCase().indexOf('android') > -1) {
25
+      const vid = el.value;
26
+
27
+      vid.play();
28
+
29
+      if (vid.currentTime) {
30
+        vid.pause();
31
+
32
+        const t = setTimeout(() => {
33
+          vid.play();
34
+          clearTimeout(t);
35
+        }, 500);
36
+      }
37
+    }
38
+  });
39
+</script>
40
+
41
+<style lang="less" scoped>
42
+.first-pg {
43
+  position: relative;
44
+
45
+  #firstVideo {
46
+    position: absolute;
47
+    width: 100%;
48
+    height: 100%;
49
+    margin: 0;
50
+    z-index: 0;
51
+    left: 0;
52
+    top: 0;
53
+  }
54
+}
55
+</style>

+ 1
- 1
src/components/Bell.vue Wyświetl plik

@@ -53,7 +53,7 @@ const animate = computed(() => state.value === 1);
53 53
       flex: none;
54 54
       width: 50%;
55 55
       height: 50%;
56
-      border: 2px solid rgba(223, 183, 132, 1);
56
+      border: 2px solid rgba(255, 255, 255, 1);
57 57
       border-radius: 50%;
58 58
       opacity: 0;
59 59
     }

+ 1
- 0
src/main.js Wyświetl plik

@@ -18,6 +18,7 @@ app.mount('#app');
18 18
 document.addEventListener('WeixinJSBridgeReady', () => {
19 19
   const t = setTimeout(() => {
20 20
     const vid = document.querySelector('#firstVideo');
21
+    console.log('-------------->', vid)
21 22
     if (vid) {
22 23
       vid.play();
23 24
     }

+ 54
- 0
src/pages/pg1/CircleImg.vue Wyświetl plik

@@ -0,0 +1,54 @@
1
+<template>
2
+  <div class="light-img-box">
3
+    <div class="light-img-wrapper">
4
+      <img class="light-img-bg ani-circle" src="/images/pg1/light.png" alt="" v-if="animate">
5
+      <img class="light-img-bg" src="/images/pg1/light-2.png" alt="" v-else>
6
+      <div class="light-img-img">
7
+        <div>
8
+          <slot />
9
+        </div>
10
+      </div>
11
+    </div>
12
+  </div>
13
+</template>
14
+
15
+<script setup>
16
+  const props = defineProps({
17
+    animate: Boolean
18
+  });
19
+</script>
20
+
21
+<style lang="less" scoped>
22
+.light-img-box {
23
+  .light-img-wrapper {
24
+    position: relative;
25
+    width: 100%;
26
+    height: 100%;
27
+
28
+    .light-img-bg {
29
+      width: 100%;
30
+      height: 100%;
31
+      position: absolute;
32
+      z-index: 0;
33
+
34
+      animation-duration: 2s;
35
+      animation-timing-function: linear;
36
+      animation-iteration-count: infinite;
37
+    }
38
+
39
+    .light-img-img {
40
+      height: 100%;
41
+      width: 100%;
42
+      display: flex;
43
+      justify-content: center;
44
+      align-items: center;
45
+
46
+      & > div {
47
+        flex: none;
48
+        width: calc(100% - 24px) !important;
49
+        height: calc(100% - 24px) !important;
50
+      }
51
+    }
52
+  }
53
+}
54
+</style>

+ 1
- 1
src/pages/pg1/Logo.vue Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 <template>
2
-<img src="/images/pg1/logo.png" />
2
+<img src="/images/广电logo.png" />
3 3
 </template>
4 4
 
5 5
 <script setup>

+ 11
- 51
src/pages/pg1/P1.vue Wyświetl plik

@@ -1,15 +1,12 @@
1 1
 <template>
2 2
   <div class="p1-box">
3 3
     <div class="content-left">
4
-      <img
5
-        class="main-img animate__animated animate__rotateIn"
6
-        style="animation-delay: 500ms"
7
-        src="/images/pg1/earth.png"
8
-        alt=""
9
-      >
10
-      <div class="back-line">
11
-        <img src="/images/pg1/line1.png" alt="">
12
-      </div>
4
+      <CircleImg class="main-img" :animate="animate">
5
+        <img
6
+          src="/images/pg1/earth.png"
7
+          alt=""
8
+        >
9
+      </CircleImg>
13 10
     </div>
14 11
     <div class="content-right txt">      
15 12
       <p class="animate__animated animate__fadeInRight" style="animation-delay: 100ms">
@@ -22,6 +19,11 @@
22 19
 </template>
23 20
 
24 21
 <script setup>
22
+  import CircleImg from './CircleImg.vue';
23
+  
24
+  const props = defineProps({
25
+    animate: Boolean
26
+  });
25 27
 </script>
26 28
 
27 29
 <style lang="less" scoped>
@@ -38,48 +40,6 @@
38 40
       z-index: 10;
39 41
     }
40 42
 
41
-    .back-line {
42
-      position: absolute;
43
-      z-index: 0;
44
-      left: -4vw;
45
-      top: 0;
46
-
47
-      img {
48
-        width: auto;
49
-        height: 40vw;
50
-        position: relative;
51
-        z-index: 0;
52
-      }
53
-
54
-      &::after {
55
-        content: '';
56
-        position: absolute;
57
-        top: 0;
58
-        left: 0;
59
-        width: 100%;
60
-        height: 100%;
61
-        background-image: url('/images/BG.jpg');
62
-        background-size: 100% 100%;
63
-        background-repeat: no-repeat;
64
-        transform-origin: bottom center;
65
-        animation-name: erasure;
66
-        animation-duration: 1s;
67
-        animation-delay: 1s;
68
-        animation-timing-function: cubic-bezier(0.07, 0.85, 0.18, 0.96);
69
-        animation-fill-mode: forwards;
70
-        z-index: 10;
71
-      }
72
-      
73
-      @keyframes erasure {
74
-        from {
75
-          transform: scaleY(100%);
76
-        }
77
-
78
-        to {
79
-          transform: scaleY(0);
80
-        }
81
-      }
82
-    }
83 43
   }
84 44
 
85 45
   .content-right {

+ 12
- 52
src/pages/pg1/P2.vue Wyświetl plik

@@ -1,18 +1,15 @@
1 1
 <template>
2 2
   <div class="p2-box">
3 3
     <div class="content-right">
4
-      <img
5
-        class="main-img animate__animated animate__rotateIn"
6
-        style="animation-delay: 1.5s"
7
-        src="/images/pg1/honour.png"
8
-        alt=""
9
-      >
10
-      <div class="back-line">
11
-        <img src="/images/pg1/line2.png" alt="">
12
-      </div>
4
+      <CircleImg class="main-img" :animate="animate">
5
+        <img
6
+          src="/images/pg1/honour.png"
7
+          alt=""
8
+        >
9
+      </CircleImg>
13 10
     </div>
14 11
     <div class="content-left txt">      
15
-      <p class="animate__animated animate__fadeInRight" style="text-align: right; animation-delay: 2s">
12
+      <p class="animate__animated animate__fadeInRight" style="text-align: right; animation-delay: 100ms">
16 13
         <strong>近20万枚</strong> <br>
17 14
         紫金草徽章 <br>
18 15
         佩戴在了人们的心口
@@ -22,6 +19,11 @@
22 19
 </template>
23 20
 
24 21
 <script setup>
22
+  import CircleImg from './CircleImg.vue';
23
+
24
+  const props = defineProps({
25
+    animate: Boolean
26
+  });
25 27
 </script>
26 28
 
27 29
 <style lang="less" scoped>
@@ -40,48 +42,6 @@
40 42
       z-index: 10;
41 43
     }
42 44
 
43
-    .back-line {
44
-      position: absolute;
45
-      z-index: 0;
46
-      right: -4vw;
47
-      bottom: -10vw;
48
-
49
-      img {
50
-        width: auto;
51
-        height: 24.7vw;
52
-        position: relative;
53
-        z-index: 0;
54
-      }
55
-
56
-      &::after {
57
-        content: '';
58
-        position: absolute;
59
-        top: 0;
60
-        left: 0;
61
-        width: 100%;
62
-        height: 100%;
63
-        background-image: url('/images/BG.jpg');
64
-        background-size: 100% 100%;
65
-        background-repeat: no-repeat;
66
-        transform-origin: bottom center;
67
-        animation-name: erasure;
68
-        animation-duration: 1s;
69
-        animation-delay: 2.5s;
70
-        animation-timing-function: cubic-bezier(0.07, 0.85, 0.18, 0.96);
71
-        animation-fill-mode: forwards;
72
-        z-index: 10;
73
-      }
74
-      
75
-      @keyframes erasure {
76
-        from {
77
-          transform: scaleY(100%);
78
-        }
79
-
80
-        to {
81
-          transform: scaleY(0);
82
-        }
83
-      }
84
-    }
85 45
   }
86 46
 
87 47
   .content-left {

+ 12
- 7
src/pages/pg1/P3.vue Wyświetl plik

@@ -1,15 +1,15 @@
1 1
 <template>
2 2
   <div class="p3-box">
3 3
     <div class="content-left">
4
-      <img
5
-        class="main-img animate__animated animate__rotateIn"
6
-        style="animation-delay: 3s"
7
-        src="/images/pg1/peace.png"
8
-        alt=""
9
-      >
4
+      <CircleImg class="main-img" :animate="animate">
5
+        <img
6
+          src="/images/pg1/peace.png"
7
+          alt=""
8
+        >
9
+      </CircleImg>
10 10
     </div>
11 11
     <div class="content-right txt">      
12
-      <p class="animate__animated animate__fadeInLeft" style="animation-delay: 3.5s">
12
+      <p class="animate__animated animate__fadeInLeft">
13 13
         在<strong>2亿人</strong>心中 <br>
14 14
         和平愿景被播撒
15 15
       </p>
@@ -18,6 +18,11 @@
18 18
 </template>
19 19
 
20 20
 <script setup>
21
+  import CircleImg from './CircleImg.vue';
22
+  
23
+  const props = defineProps({
24
+    animate: Boolean
25
+  });
21 26
 </script>
22 27
 
23 28
 <style lang="less" scoped>

+ 26
- 20
src/pages/pg1/index.vue Wyświetl plik

@@ -1,29 +1,28 @@
1 1
 <template>
2 2
   <div class="page pg-bg pg1" parallax>
3
+    <div class="bg">
4
+      <div>
5
+        <img src="/images/pg1/bg1.png" alt="">
6
+      </div>
7
+    </div>
3 8
     <div class="conent">
4 9
       <div class="header">        
5 10
         <Logo class="logo" />
6 11
       </div>
7 12
       <div class="body" parallax-offset='-100'>
8
-        <Part1 class="part1" @click="onClick(1)" />
9
-        <Part2 class="part2" @click="onClick(2)" />
10
-        <Part3 class="part3" @click="onClick(3)" />
13
+        <Part1 class="part1" :animate="active == 1" @click="onClick(1)" />
14
+        <Part2 class="part2" :animate="active == 2" @click="onClick(2)" />
15
+        <Part3 class="part3" :animate="active == 3" @click="onClick(3)" />
11 16
       </div>
12 17
     </div>
13
-    <div class="footer abs animate__animated animate__fadeInUp" style="animation-delay: 4s">
14
-      <img src="/images/pg1/stele.png" alt="" parallax-offset='-200'>
15
-    </div>
16
-    <div class="footer stele2 animate__animated animate__fadeInUp" style="animation-delay: 4s">
17
-      <img src="/images/pg1/stele2.png" alt="" parallax-offset='-230'>
18
-    </div>
19
-    <div class="footer abs animate__animated animate__fadeInUp" style="animation-delay: 4.5s">
20
-      <img src="/images/pg1/wall.png" alt="" parallax-offset='-250'>
18
+    <div class="footer abs animate__animated animate__fadeInUp">
19
+      <img src="/images/pg1/bg2.png" alt="" parallax-offset='-200'>
21 20
     </div>
22 21
   </div>
23 22
 </template>
24 23
 
25 24
 <script setup>
26
-  import { onMounted } from 'vue';
25
+  import { onMounted, ref } from 'vue';
27 26
   import { useRouter } from 'vue-router';
28 27
   import Bell from '@/components/Bell.vue';
29 28
   import Logo from './Logo.vue';
@@ -37,9 +36,23 @@
37 36
     router.push(`/bk1?page=${page}`);
38 37
   }
39 38
 
39
+  const active = ref(1);
40
+
40 41
 </script>
41 42
 
42 43
 <style lang="less" scoped>
44
+  .bg {
45
+    position: absolute;
46
+    z-index: 0;
47
+    width: 100%;
48
+    height: 100%;
49
+    left: 0;
50
+    top: 0;
51
+    & > div {
52
+      position: relative;
53
+    }
54
+  }
55
+
43 56
   .conent {
44 57
     position: relative;
45 58
     height: 100%;
@@ -57,7 +70,7 @@
57 70
     }
58 71
 
59 72
     .body {
60
-      margin-top: 5vh;
73
+      margin-top: 20vh;
61 74
     }
62 75
 
63 76
     .part2 {
@@ -75,11 +88,4 @@
75 88
     z-index: 10;
76 89
   }
77 90
 
78
-  .stele2 {
79
-    position: absolute;
80
-    left: auto;
81
-    right: 0;
82
-    bottom: 0;
83
-    width: 32vw;
84
-  }
85 91
 </style>

+ 21
- 6
src/style.less Wyświetl plik

@@ -39,10 +39,11 @@ img {
39 39
   /* background-image: url('/images/BG.jpg');
40 40
   background-repeat: repeat; */
41 41
 
42
+  background-color: #F5F5F5;
42 43
   
43
-  background-image: url('/images/BG.jpg');
44
-  background-size: 100% 100%;
45
-  background-repeat: repeat-y;
44
+  // background-image: url('/images/BG.jpg');
45
+  // background-size: 100% 100%;
46
+  // background-repeat: repeat-y;
46 47
 }
47 48
 
48 49
 .abs {
@@ -54,7 +55,7 @@ img {
54 55
 }
55 56
 
56 57
 .txt {
57
-  color: #5f4234;
58
+  color: #000;
58 59
   line-height: 2em;
59 60
 
60 61
   strong {
@@ -62,8 +63,8 @@ img {
62 63
     padding: 0 4px;
63 64
     font-size: 1.1em;
64 65
     font-weight: 700;
65
-    color: #b87c58;
66
-    text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 2px #fff, 0 0 2px #fff, rgba(0, 0, 0, .5) 0 2px 2px;
66
+    color: #fff;
67
+    text-shadow: 0 0 2px #8576B3, 0 0 2px #8576B3, 0 0 2px #8576B3, 0 0 2px #8576B3, rgba(0, 0, 0, .5) 0 2px 2px;
67 68
     // text-stroke: 1px #fff;
68 69
     // -webkit-text-stroke: 1px #fff;
69 70
   }
@@ -80,4 +81,18 @@ img {
80 81
   to {
81 82
     transform: scale(1.2);
82 83
   }
84
+}
85
+
86
+
87
+.ani-circle {
88
+  animation-name: circle;
89
+}
90
+
91
+@keyframes circle {
92
+  from {
93
+    transform: rotate(0);
94
+  }
95
+  to {
96
+    transform: rotate(360deg);
97
+  }
83 98
 }

+ 1
- 0
src/utils/request.js Wyświetl plik

@@ -1,6 +1,7 @@
1 1
 import axios from "axios";
2 2
 
3 3
 const instance = axios.create({
4
+  baseURL: API_BASE,
4 5
   timeout: 10000,
5 6
   withCredentials: true, // 跨域
6 7
 });

+ 1
- 1
src/utils/wx.js Wyświetl plik

@@ -28,7 +28,7 @@ function wxsdk() {
28 28
     const url = window.location.href;
29 29
 
30 30
     // 请求后台接口
31
-    fetch(`${apiBase}?url=${encodeURIComponent(url)}`).then(res => res.json()).then((res) => {
31
+    fetch(`${apiBase}/api/wx/jsapi?url=${encodeURIComponent(url)}`).then(res => res.json()).then((res) => {
32 32
       if (res.code === 1000) {
33 33
         const data = res.data;
34 34