Browse Source

Merge branch 'master' of http://git.ycjcjy.com/H5/njDaTuSha

Yansen 1 year ago
parent
commit
ab2d593d3b

+ 37
- 2
index.html View File

4
     <meta charset="UTF-8" />
4
     <meta charset="UTF-8" />
5
     <link rel="icon" type="image/svg+xml" href="/vite.svg" />
5
     <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
     <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover" />
6
     <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover" />
7
-    <script src="./wx/jweixin-1.6.0.js"></script>
7
+    <meta name="screen-orientation" content="portrait">
8
+    <!-- <script src="./wx/jweixin-1.6.0.js"></script> -->
9
+    <script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
8
     <script src="./jquery.1.9.1.js"></script>
10
     <script src="./jquery.1.9.1.js"></script>
9
     <script src="./turn.min.js"></script>
11
     <script src="./turn.min.js"></script>
10
     <script src="./config.js"></script>
12
     <script src="./config.js"></script>
19
       type="text/css"
21
       type="text/css"
20
     /> -->
22
     /> -->
21
     <link rel="stylesheet" href="./fonts/SourceHanSerifCN-Medium/SourceHanSerifCN-Medium.css">
23
     <link rel="stylesheet" href="./fonts/SourceHanSerifCN-Medium/SourceHanSerifCN-Medium.css">
22
-    <title>向世界讲述——南京1937</title>
24
+    <title>让和平的“种子”,在全世界生根发芽</title>
23
     <!-- <script src="./vconsole.min.js"></script>
25
     <!-- <script src="./vconsole.min.js"></script>
24
     <script>
26
     <script>
25
       const vConsole = new VConsole();
27
       const vConsole = new VConsole();
26
     </script> -->
28
     </script> -->
29
+    <style>
30
+      #vid-cover {
31
+        position: relative;
32
+        z-index: 20000;
33
+      }
34
+
35
+      #vid-cover .goback {
36
+        position: fixed;
37
+        top: 10px;
38
+        width: 50px;
39
+        height: 50px;
40
+      }
41
+
42
+      /* 横屏 */
43
+      @media all and (orientation : landscape) {
44
+        #vid-cover .goback {
45
+          left: 10px;
46
+        }
47
+      }
48
+      /* 竖屏 */
49
+      @media all and (orientation : portrait) {
50
+        #vid-cover .goback {
51
+          right: 10px;
52
+          transform: rotate(90deg);
53
+        }
54
+      }
55
+    </style>
27
   </head>
56
   </head>
28
   <body>
57
   <body>
58
+    <img src="/share.jpg" style="display: none;" />
29
     <div id="app"></div>
59
     <div id="app"></div>
30
     <script type="module" src="/src/main.js"></script>
60
     <script type="module" src="/src/main.js"></script>
31
   </body>
61
   </body>
62
+  <script>
63
+    var el = document.createElement('div');
64
+    el.id = 'vid-cover'
65
+    document.documentElement.appendChild(el);
66
+  </script>
32
 </html>
67
 </html>

BIN
public/audio/audio2.mp3 View File


+ 4
- 3
public/config.js View File

1
 // 微信分享
1
 // 微信分享
2
 const shareOptTpl = {
2
 const shareOptTpl = {
3
-  title: '向世界讲述——南京1937',
4
-  desc: '',
5
-  imgUrl: location.origin + location.pathname.replace('index.html', '') + 'share.jpg',
3
+  title: '让和平的“种子”,在全世界生根发芽',
4
+  desc: '紫金草行动:向世界讲述南京1937',
5
+  link: 'http://zjc.nbs.cn/index.html',
6
+  imgUrl: 'http://zjc.nbs.cn/share.jpg',
6
 }
7
 }
7
 
8
 
8
 // 跳转链接
9
 // 跳转链接

BIN
public/images/down.png View File


BIN
public/images/down1.png View File


BIN
public/images/pg1/videocover.jpg View File


BIN
public/images/pg2-2/紫金草跳转按钮.gif View File


BIN
public/images/share.jpg View File


BIN
public/video/9年活动.mp4 View File


+ 8
- 4
src/components/DownArrow.vue View File

17
   }
17
   }
18
 
18
 
19
   @keyframes mv-down {
19
   @keyframes mv-down {
20
-    from {
20
+    0% {
21
       transform: translateY(0);
21
       transform: translateY(0);
22
       opacity: 1;
22
       opacity: 1;
23
     }
23
     }
24
 
24
 
25
-    to {
26
-      transform: translateY(2vh);
27
-      opacity: 0;
25
+    60% {
26
+      opacity: 1;
27
+    }
28
+
29
+    100% {
30
+      transform: translateY(4vh);
31
+      opacity: .1;
28
     }
32
     }
29
   }
33
   }
30
 </style>
34
 </style>

+ 1
- 0
src/main.js View File

2
 import VueSplide from '@splidejs/vue-splide';
2
 import VueSplide from '@splidejs/vue-splide';
3
 import 'animate.css'
3
 import 'animate.css'
4
 import '@splidejs/vue-splide/css/core';
4
 import '@splidejs/vue-splide/css/core';
5
+
5
 import { getCode, redirect } from '@/utils/wx';
6
 import { getCode, redirect } from '@/utils/wx';
6
 
7
 
7
 import App from './App.vue'
8
 import App from './App.vue'

+ 1
- 1
src/pages/bk1/pg1.vue View File

45
         加拿大、日本、韩国、马拉西亚、澳大利亚、<br>
45
         加拿大、日本、韩国、马拉西亚、澳大利亚、<br>
46
         新西兰、新加坡,紫金草在14个国家被点亮,<br>
46
         新西兰、新加坡,紫金草在14个国家被点亮,<br>
47
         播撒和平的种子。<br>
47
         播撒和平的种子。<br>
48
-        近20万枚紫金草徽章佩戴在了人们的心口
48
+        近20万枚紫金草徽章佩戴在了人们的胸前
49
       </p>
49
       </p>
50
     </div>
50
     </div>
51
 
51
 

+ 1
- 2
src/pages/pg1/Md1.vue View File

11
           中国、芬兰、土耳其、德国、英国、瑞士、美国、<br>
11
           中国、芬兰、土耳其、德国、英国、瑞士、美国、<br>
12
           加拿大、日本、韩国、马拉西亚、澳大利亚、<br>
12
           加拿大、日本、韩国、马拉西亚、澳大利亚、<br>
13
           新西兰、新加坡,紫金草在14个国家被点亮,<br>
13
           新西兰、新加坡,紫金草在14个国家被点亮,<br>
14
-          播撒和平的种子。<br>
15
-          近20万枚紫金草徽章佩戴在了人们的心口。
14
+          播撒和平的种子。
16
         </p>
15
         </p>
17
         <!-- <div class="map-img" ref="mapRef" /> -->
16
         <!-- <div class="map-img" ref="mapRef" /> -->
18
         <!-- <img class="map-img" src="/images/pg2/map.gif" alt=""> -->
17
         <!-- <img class="map-img" src="/images/pg2/map.gif" alt=""> -->

+ 82
- 56
src/pages/pg1/video.vue View File

1
 <template>
1
 <template>
2
-  <div class="page pg-bg video-pg">
3
-    <GoBack class="goback abs" @click.stop="router.go(-1)" />
4
-    <div class="content">
2
+  <div class="page pg-bg video-pg" @click="onPageClick">
3
+    <Teleport to="#vid-cover">
4
+      <div class="goback" @click="router.go(-1)">
5
+        <GoBack />
6
+      </div>
7
+    </Teleport>
8
+    <div class="video-wrapper">
5
       <video
9
       <video
6
         webkit-playsinline
10
         webkit-playsinline
7
         playsinline
11
         playsinline
8
         preload="auto"
12
         preload="auto"
9
-        autoplay="autoplay"
10
         controls="controls"
13
         controls="controls"
14
+        x5-video-player-type="h5"
15
+        x5-video-orientation="landscape"
16
+        x5-video-player-fullscreen="false"
17
+        poster="/images/pg1/videocover.jpg"
11
         ref="mediaRef"
18
         ref="mediaRef"
12
         src="/video/9年活动.mp4"
19
         src="/video/9年活动.mp4"
13
-      ></video>
20
+        @click="onVidClick"
21
+      >not support</video>
14
     </div>
22
     </div>
15
   </div>
23
   </div>
16
 </template>
24
 </template>
17
 
25
 
18
 <script setup>
26
 <script setup>
19
-import { onMounted, ref } from "vue";
27
+import { onBeforeUnmount, onMounted, ref } from "vue";
20
 import { useRouter } from "vue-router";
28
 import { useRouter } from "vue-router";
21
 import { useModel } from "@zjxpcyc/vue-tiny-store";
29
 import { useModel } from "@zjxpcyc/vue-tiny-store";
22
 import GoBack from "@/components/GoBack.vue";
30
 import GoBack from "@/components/GoBack.vue";
25
 
33
 
26
 const router = useRouter();
34
 const router = useRouter();
27
 const mediaRef = ref();
35
 const mediaRef = ref();
28
-const show = ref(false);
29
 const controls = ref();
36
 const controls = ref();
30
 
37
 
31
 onMounted(() => {
38
 onMounted(() => {
32
   pause();
39
   pause();
33
 
40
 
34
-  // 自动播放
35
-  try {
36
-    const t = setTimeout(() => {
37
-      clearTimeout(t);
38
-
39
-      // 可能抛出异步异常
40
-      const p = mediaRef.value.play();
41
-      if (p) {
42
-        p.then(() => {
43
-          mediaRef.value.play();
44
-        }).catch((err) => {
45
-          console.log("--play-err---", err);
46
-          controls.value = "controls";
47
-        });
48
-      }
49
-    }, 300);
50
-  } catch (err) {
51
-    console.log("---err---", err);
52
-    controls.value = "controls";
53
-  }
41
+  // // 自动播放
42
+  // try {
43
+  //   const t = setTimeout(() => {
44
+  //     clearTimeout(t);
45
+
46
+  //     // 可能抛出异步异常
47
+  //     const p = mediaRef.value.play();
48
+  //     if (p) {
49
+  //       p.then(() => {
50
+  //         mediaRef.value.play();
51
+  //       }).catch((err) => {
52
+  //         console.log("--play-err---", err);
53
+  //         controls.value = "controls";
54
+  //       });
55
+  //     }
56
+  //   }, 300);
57
+  // } catch (err) {
58
+  //   console.log("---err---", err);
59
+  //   controls.value = "controls";
60
+  // }
61
+
62
+  
63
+  // // 自动全屏
64
+  // function launchFullscreen(element) {
65
+  //   if(element.requestFullscreen) {
66
+  //     element.requestFullscreen();
67
+  //   } else if(element.mozRequestFullScreen) {
68
+  //     element.mozRequestFullScreen();
69
+  //   } else if(element.webkitRequestFullscreen) {
70
+  //     element.webkitRequestFullscreen();
71
+  //   } else if(element.msRequestFullscreen) {
72
+  //     element.msRequestFullscreen();
73
+  // }}
74
+
75
+  // launchFullscreen(mediaRef.value);
54
 });
76
 });
77
+
55
 </script>
78
 </script>
56
 
79
 
57
 <style lang="less" scoped>
80
 <style lang="less" scoped>
81
+
82
+/* 横屏 */
83
+@media all and (orientation : landscape) {
84
+  .video-pg {
85
+    width: 100vw;
86
+    height: 100vh;
87
+  }
88
+}
89
+
90
+/* 竖屏 */
91
+@media all and (orientation : portrait) {
92
+  .video-pg {
93
+    width: 100vh;
94
+    height: 100vw;
95
+    transform-origin: center left;
96
+    transform: rotate(90deg) translate3d(-50vw, -50vw, 0);
97
+  }
98
+}
99
+
58
 .video-pg {
100
 .video-pg {
59
   position: relative;
101
   position: relative;
60
   background-color: #000;
102
   background-color: #000;
103
+  overflow: hidden;
61
   display: flex;
104
   display: flex;
62
   align-items: center;
105
   align-items: center;
106
+  justify-content: center;
63
 
107
 
64
   .goback {
108
   .goback {
65
-    z-index: 100;
109
+    position: fixed;
110
+    z-index: 20001;
66
     left: 10px;
111
     left: 10px;
67
     top: 10px;
112
     top: 10px;
68
   }
113
   }
69
-  .content {
114
+
115
+  .video-wrapper {
70
     position: relative;
116
     position: relative;
71
-    video {
72
-      // width: 100%;
73
-      width: 100vw;
74
-      z-index: 1;
75
-    }
76
-    .play-action {
77
-      position: absolute;
78
-      z-index: 2;
79
-      bottom: -80px;
80
-      width: 100%;
81
-      height: 80px;
82
-      display: flex;
83
-      align-items: center;
84
-      justify-content: center;
85
-
86
-      img {
87
-        width: 100px;
88
-        width: 30vw;
89
-        height: 10vw;
90
-      }
91
-      img:first-child {
92
-        margin-right: 20px;
93
-      }
94
-      img:last-child {
95
-        margin-left: 20px;
96
-      }
97
-    }
117
+    flex: none;
118
+    width: 90%;
119
+    height: 90%;
120
+  }
121
+
122
+  video {
123
+    width: 100%;
98
   }
124
   }
99
 }
125
 }
100
 </style>
126
 </style>

+ 10
- 13
src/pages/pg2-2/index.vue View File

122
           <br />唤起人们对和平的向往和珍视,
122
           <br />唤起人们对和平的向往和珍视,
123
           <br />南京广播电视集团发起了“紫金草行动”。<br />九年了,
123
           <br />南京广播电视集团发起了“紫金草行动”。<br />九年了,
124
           <br />
124
           <br />
125
-          <Animate
126
-            comp="span"
127
-            class="animate__infinite"
128
-            name="animate__headShake"
129
-            style="display: inline-block; width: 50vw; margin-top: 10px;"
130
-            delay="300ms"
131
-            :ready="show3"
132
-            @click="onGoFoward"
133
-          >
134
-            <img src="/images/pg2-2/goAgain.png" alt="">
135
-          </Animate>
125
+          <!-- 这个动效不要了 -->
126
+          <img class="" src="/images/pg2-2/goAgain.png" alt="" @click="onGoFoward">
136
         </p>
127
         </p>
137
       </Animate>
128
       </Animate>
138
     </div>
129
     </div>
139
     <div class="bk-pd content">
130
     <div class="bk-pd content">
140
-      <img class="zjclogo-img" src="/images/pg2-2/紫金草行动logo拷贝.png" />
131
+      <img class="zjclogo-img" src="/images/pg2-2/紫金草跳转按钮.gif" @click="onGoFoward" />
141
     </div>
132
     </div>
142
   </div>
133
   </div>
143
 </template>
134
 </template>
272
   .content {
263
   .content {
273
     .topbottom {
264
     .topbottom {
274
       margin: 0 auto;
265
       margin: 0 auto;
266
+
267
+      img {
268
+        width: 50vw;
269
+        margin: auto;
270
+        margin-top: 16px;
271
+      }
275
     }
272
     }
276
   }
273
   }
277
   .content {
274
   .content {
278
     .zjclogo-img {
275
     .zjclogo-img {
279
       margin: 1em auto;
276
       margin: 1em auto;
280
-      width: 38%;
277
+      width: 60%;
281
       display: inline-block;
278
       display: inline-block;
282
     }
279
     }
283
   }
280
   }

+ 1
- 1
src/pages/pg3/index.vue View File

64
         delay="1s"
64
         delay="1s"
65
         :ready="show"
65
         :ready="show"
66
       >
66
       >
67
-        正如“紫金草行动”初衷一样,我们身边越来越多人,用自己的方式向世界讲述1937,他们不同年龄、不同肤色、不同国家、不同职业,但他们讲述的是全人类共同的心愿。
67
+        正如“紫金草行动”初衷一样,我们身边越来越多人,用自己的方式向世界讲述南京1937,他们不同年龄、不同肤色、不同国家、不同职业,但他们讲述的是全人类共同的心愿。
68
       </Animate>
68
       </Animate>
69
     </div>
69
     </div>
70
 
70
 

+ 1
- 1
src/pages/share/index.vue View File

10
       <div class="content txt">
10
       <div class="content txt">
11
         <div class="name">{{ user.nickname || "朋友" }}</div>
11
         <div class="name">{{ user.nickname || "朋友" }}</div>
12
         <div style="line-height: 1.6em">
12
         <div style="line-height: 1.6em">
13
-          您是第{{user.num}}位“紫金草行动”参与者。播撒紫金草种子,让和平之花开满全
13
+          您是第{{user.num}}位“紫金草行动”参与者。播撒紫金草种子,让和平之花开满全世界
14
         </div>
14
         </div>
15
       </div>
15
       </div>
16
     </div>
16
     </div>

+ 2
- 0
src/utils/resources.js View File

63
   { image: './images/pg2-2/图.png' },
63
   { image: './images/pg2-2/图.png' },
64
   { image: './images/pg2-2/照片4.png' },
64
   { image: './images/pg2-2/照片4.png' },
65
   { image: './images/pg2-2/紫金草行动logo拷贝.png' },
65
   { image: './images/pg2-2/紫金草行动logo拷贝.png' },
66
+  { image: './images/pg2-2/紫金草跳转按钮.gif' },
66
   { image: './images/pg2-2/组4.png' },
67
   { image: './images/pg2-2/组4.png' },
67
 
68
 
68
   { image: './images/pg3/1.png' },
69
   { image: './images/pg3/1.png' },
88
   { image: './images/pg4/播撒种子.png' },
89
   { image: './images/pg4/播撒种子.png' },
89
   { image: './images/pg4/重播.png' },
90
   { image: './images/pg4/重播.png' },
90
   { image: './images/pg4/vid-poster.png' },
91
   { image: './images/pg4/vid-poster.png' },
92
+  { image: './images/pg1/videocover.jpg' },
91
 
93
 
92
   { image: './images/pg4/plant/中国-.png' },
94
   { image: './images/pg4/plant/中国-.png' },
93
   { image: './images/pg4/plant/中国.png' },
95
   { image: './images/pg4/plant/中国.png' },

+ 18
- 6
src/utils/wx.js View File

32
   // API_BASE 来源 public/config.js
32
   // API_BASE 来源 public/config.js
33
   const apiBase = API_BASE // import.meta.env.VITE_APP_API_BASE
33
   const apiBase = API_BASE // import.meta.env.VITE_APP_API_BASE
34
 
34
 
35
-
36
   // 分享接口
35
   // 分享接口
37
   const shareAPIs = [
36
   const shareAPIs = [
38
     // 自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)
37
     // 自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)
51
     'onMenuShareQZone',
50
     'onMenuShareQZone',
52
   ]
51
   ]
53
 
52
 
53
+  let inited = false;
54
+
54
   function init() {
55
   function init() {
55
     if (isDev) return;
56
     if (isDev) return;
56
     const url = window.location.href;
57
     const url = window.location.href;
77
     })
78
     })
78
   }
79
   }
79
 
80
 
80
-  // 立即执行
81
-  init();
82
-
83
   function share(params = {}) {
81
   function share(params = {}) {
84
     if (isDev) return;
82
     if (isDev) return;
85
 
83
 
84
+    if (!inited) {
85
+      init();
86
+    }
87
+
86
     wx.ready(() => {
88
     wx.ready(() => {
87
 
89
 
88
       const shareData = {
90
       const shareData = {
93
       console.log('---分享参数-->', shareData);
95
       console.log('---分享参数-->', shareData);
94
 
96
 
95
       for (let api of shareAPIs) {
97
       for (let api of shareAPIs) {
96
-        if (typeof wx[api] === 'function') continue;
97
-        wx[api](shareData);
98
+        wx[api]({
99
+          ...shareData,
100
+          success: () => {
101
+            console.log('分享成功: ', api)
102
+          },
103
+        });
98
       }
104
       }
99
     });
105
     });
106
+
107
+    wx.error(function(res){
108
+      console.error('wx js-sdk error');
109
+      console.error(res);
110
+      console.error('<==============');
111
+    });
100
   }
112
   }
101
 
113
 
102
   return {
114
   return {