Yansen 2 年之前
父節點
當前提交
e550c5df7f
共有 6 個檔案被更改,包括 33 行新增12 行删除
  1. 1
    1
      public/config.js
  2. 4
    3
      src/pages/pg1/Md2.vue
  3. 1
    1
      src/pages/pg1/P2.vue
  4. 4
    0
      src/pages/pg4/Flower.vue
  5. 18
    7
      src/pages/pg4/Map.vue
  6. 5
    0
      src/store/index.js

+ 1
- 1
public/config.js 查看文件

@@ -35,6 +35,6 @@ const FAMOUS_LINKS = [
35 35
   },
36 36
   {      
37 37
     image: './images/pg3/6.png',
38
-    link: '',
38
+    link: 'http://m2.nbs.cn/article/565729.html?id=565729&mid=1',
39 39
   },
40 40
 ]

+ 4
- 3
src/pages/pg1/Md2.vue 查看文件

@@ -9,9 +9,10 @@
9 9
         <p class="txt animate__animated animate__fadeInDown">
10 10
           南京广电集团以“紫金草”为原型,<br />
11 11
           制作紫金草徽章发放给市民。<br />
12
-          9年来,20万人加入“紫金草行动”,<br />
13
-          把紫金草徽章佩戴在离心脏最近的地方。<br />
14
-          在2亿人心中,和平的愿景被播撒。
12
+          9年来,来自五湖四海的近20万人,<br />
13
+          通过各类线下活动、<br />
14
+          微信、微博、邮箱、电话与我们取得联系,<br />
15
+          把紫金草徽章佩戴在离心脏最近的地方。
15 16
         </p>
16 17
         <img class="animate__animated animate__fadeInDown" style="animation-delay: 300ms;" src="/images/pg1/md1-1.png" alt="">
17 18
       </div>

+ 1
- 1
src/pages/pg1/P2.vue 查看文件

@@ -12,7 +12,7 @@
12 12
       <p class="animate__animated animate__fadeInRight" style="text-align: right; animation-delay: 100ms">
13 13
         <strong :class="{pulsatebck:animate}" style="display: inline-block;">近20万枚</strong> <br>
14 14
         紫金草徽章 <br>
15
-        佩戴在了人们的心口
15
+        佩戴在了人们的胸前
16 16
       </p>
17 17
     
18 18
     </div>

+ 4
- 0
src/pages/pg4/Flower.vue 查看文件

@@ -29,6 +29,10 @@
29 29
   const { user, countries, updateCountries } = useModel('user');
30 30
 
31 31
   const countryData = computed(() => {
32
+    if (props.country == '全球') {
33
+      return ({ name: props.country, num: user?.value?.num || 0 });
34
+    }
35
+
32 36
     const it = (countries.value || []).filter(x => x.name === props.country)[0];
33 37
     return it || ({ name: props.country, num: 0 });
34 38
   });

+ 18
- 7
src/pages/pg4/Map.vue 查看文件

@@ -65,16 +65,27 @@
65 65
     // 绑定事件 - 很多手机 click 有问题
66 66
     map.addEventListener('click', (e) => onClick(e.point));
67 67
 
68
-    //触摸移动时触发此事件 此时开启可以拖动。虽然刚初始化该地图不可以拖动,但是可以触发拖动事件。
69
-    map.addEventListener("touchmove", function (e) {
70
-    map.enableDragging();
68
+    // 下面使用短时间的模拟点击
69
+    let starPoint = null;
70
+    map.addEventListener("touchstart", function (e) {
71
+      starPoint = e.ab;
72
+      console.log('touchstart', starPoint, e);
73
+      // map.enableDragging();
71 74
     });
72
-    //触摸结束时触发次此事件 此时开启禁止拖动
75
+    
73 76
     map.addEventListener("touchend", function (e) {
74
-    map.disableDragging();
75
-    });
77
+      const endPoint = e.ab;
78
+      console.log('touchend', endPoint, e);
79
+
80
+      const dx = Math.abs(endPoint.x - starPoint.x);
81
+      const dy = Math.abs(endPoint.y - starPoint.x);
82
+      const dis = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));
76 83
 
77
-    map.disableDragging();
84
+      if (Math.abs(dis) < 50) {
85
+        onClick(e.point)
86
+      }
87
+      // map.disableDragging();
88
+    });
78 89
 
79 90
     // 显示 marker
80 91
     countries.value.forEach(renderCountry);

+ 5
- 0
src/store/index.js 查看文件

@@ -41,6 +41,11 @@ const useUser = () => {
41 41
   const countries = ref([]);
42 42
 
43 43
   const updateCountries = (key) => {
44
+    if (key == '全球') {
45
+      user.value.num += 1;
46
+      return ;
47
+    }
48
+
44 49
     const country = countries.value.filter(x => x.name === key)[0] || { name: key, num: 0 };
45 50
     country.num += 1;
46 51