Yansen hace 2 años
padre
commit
9a6c9b8f47

+ 1
- 1
index.html Ver fichero

@@ -9,7 +9,7 @@
9 9
     <script src="./turn.min.js"></script>
10 10
     <script src="./config.js"></script>
11 11
     <script src="./slidePage/slidePage.min.js"></script>
12
-    <!-- <script src="https://api.map.baidu.com/api?v=3.0&ak=IDixtryGuZAFPZLh4r8XCAM054r8LCRs"></script> -->
12
+    <script src="https://api.map.baidu.com/api?v=3.0&ak=IDixtryGuZAFPZLh4r8XCAM054r8LCRs"></script>
13 13
 
14 14
     <link rel="stylesheet" href="./slidePage/slidePage.min.css">
15 15
 

+ 2
- 2
public/config.js Ver fichero

@@ -9,5 +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://api.h5.zijincao.njyunzhi.com';
13
-// const API_BASE = '';
12
+// const API_BASE = 'http://api.h5.zijincao.njyunzhi.com';
13
+const API_BASE = '';

BIN
public/images/pg4/close.png Ver fichero


BIN
public/images/pg4/flower-open.gif Ver fichero


BIN
public/images/pg4/map.png Ver fichero


+ 1
- 1
src/pages/pg2-2/Ink.vue Ver fichero

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div class="ink-box">
3 3
     <div>
4
-      <InkEffect class="ink-cover" :src="src" :active="active" />
4
+      <InkEffect class="ink-cover" :src="src" :speed="10" :active="active" />
5 5
       <!-- <img class="ink-back" :src="src" alt="" > -->
6 6
     </div>
7 7
   </div>

+ 59
- 3
src/pages/pg4/Flower.vue Ver fichero

@@ -1,8 +1,10 @@
1 1
 <template>
2
-  <Modal v-if="show" @cancel="emit('cancel')">
2
+  <Modal v-if="show" :close="false">
3 3
     <div class="txt modal-flower">
4
-      <p class="title">{{country}}种植数量: 12896690</p>
5
-      <p class="planting" @click="onPlanting">
4
+      <img class="close abs" src="/images/pg4/close.png" alt="" @click="onCancel">
5
+      <img class="open-flower" src="/images/pg4/flower-open.gif" alt="">
6
+      <p class="title">当前种植总数量: {{ user?.num }}</p>
7
+      <p class="planting" @click="animate">
6 8
         <img src="/images/pg4/planting.png" alt="">
7 9
       </p>
8 10
     </div>
@@ -10,6 +12,7 @@
10 12
 </template>
11 13
 
12 14
 <script setup>
15
+  import { useModel } from '@zjxpcyc/vue-tiny-store';
13 16
   import Modal from '@/components/Modal.vue';
14 17
 
15 18
   const props = defineProps({
@@ -19,8 +22,48 @@
19 22
 
20 23
   const emit = defineEmits(['cancel', 'planted']);
21 24
 
25
+  const { user, updateContries } = useModel('user');
26
+  
27
+  const animate = (e) => {
28
+    var n = 1;
29
+    var $i = $("<b/>").text("+" + n);
30
+    var x = e.pageX,
31
+      y = e.pageY;
32
+    var n = 1;
33
+    var $i = $("<b/>").text("+" + n);
34
+    var x = e.pageX,
35
+      y = e.pageY;
36
+    $i.css({
37
+      "z-index": 99999,
38
+      top: y - 20,
39
+      left: x,
40
+      position: "absolute",
41
+      color: "#fff",
42
+      fontSize: '24px'
43
+      // "color": "#C6B0EA"
44
+    });
45
+    $("body").append($i);
46
+    $i.animate(
47
+      {
48
+        top: y - 100,
49
+        opacity: 0,
50
+      },
51
+      1200,
52
+      function () {
53
+        $i.remove();
54
+      }
55
+    );
56
+    e.stopPropagation();
57
+
58
+    updateContries(props.country);
59
+  };
60
+
22 61
   const onPlanting = () => {
23 62
     //
63
+    // emit('planted');
64
+  }
65
+
66
+  const onCancel = () => {
24 67
     emit('planted');
25 68
   }
26 69
 
@@ -30,6 +73,19 @@
30 73
 .modal-flower {
31 74
   width: 70vw;
32 75
   text-align: center;
76
+  position: relative;
77
+  margin: auto;
78
+
79
+  .close {
80
+    width: 40px;
81
+    right: 10px;
82
+    top: 20px;
83
+  }
84
+
85
+  .open-flower {
86
+    width: 60vw;
87
+    margin: auto;
88
+  }
33 89
 
34 90
   .title {
35 91
     color: #fff;

+ 13
- 5
src/pages/pg4/Map.vue Ver fichero

@@ -18,11 +18,19 @@
18 18
   // 展示部分国家
19 19
   const mockCountries = [
20 20
     '中国',
21
-    '俄罗斯',
22
-    '哈萨克斯坦',
23
-    '伊朗',
24
-    '印度',
25
-    '泰国',
21
+    '芬兰',
22
+    '土耳其',
23
+    '德国',
24
+    '英国',
25
+    '瑞士',
26
+    '美国',
27
+    '加拿大',
28
+    '日本',
29
+    '韩国',
30
+    '马来西亚',
31
+    '澳大利亚',
32
+    '新西兰',
33
+    '新加坡',
26 34
   ];
27 35
 
28 36
   // getGPSOfBDCountries();

+ 28
- 0
src/pages/pg4/MapFakeMaker.vue Ver fichero

@@ -0,0 +1,28 @@
1
+<template>
2
+  <div class="map-marker">
3
+    <div>
4
+      <div class="title"></div>
5
+      <img src="/images/logo.png" alt="">
6
+    </div>
7
+  </div>
8
+</template>
9
+
10
+<script setup>
11
+
12
+</script>
13
+
14
+<style lang="less" scoped>
15
+.map-marker {
16
+  position: absolute;
17
+
18
+  & > div {
19
+    position: relative;
20
+    width: 100%;
21
+    height: 100%;
22
+  }
23
+
24
+  img {
25
+    
26
+  }
27
+}
28
+</style>

+ 2
- 2
src/pages/pg4/Share.vue Ver fichero

@@ -4,9 +4,9 @@
4 4
       <img src="/images/pg4/btn_share.png" alt="" @click="emit('share')">
5 5
       <img src="/images/pg4/btn_badge.png" alt="" @click="emit('badge')">
6 6
     </div>
7
-    <!-- <div class="share-txt txt">
7
+    <div class="share-txt txt">
8 8
       目前总种植数量: {{user.num}}
9
-    </div> -->
9
+    </div>
10 10
   </div>
11 11
 </template>
12 12
 

+ 16
- 0
src/pages/pg4/country_axis.js Ver fichero

@@ -0,0 +1,16 @@
1
+export default {
2
+  '中国': [1026, 663],
3
+  '芬兰': [645, 345],
4
+  '土耳其': [550, 573],
5
+  '德国': [485, 441],
6
+  '英国': [418, 387],
7
+  '瑞士': [419, 479],
8
+  '美国': [2075, 550],
9
+  '加拿大': [1913, 482],
10
+  '日本': [1210, 645],
11
+  '韩国': [1125, 665],
12
+  '马拉西亚': [921, 904],
13
+  '澳大利亚': [1172, 1164],
14
+  '新西兰': [1427, 1421],
15
+  '新加坡': [966, 955],
16
+}

+ 26
- 2
src/pages/pg4/index.vue Ver fichero

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div class="page pg-bg pg4">
3
-    <!-- <Map @click="onMapClick" /> -->
3
+    <Map @click="onMapClick" />
4 4
     <Rule />
5 5
     <Flower
6 6
       :show="flowerShow"
@@ -9,7 +9,7 @@
9 9
       @cancel="flowerShow = false"
10 10
     />
11 11
     <Share
12
-      v-if="!planted"
12
+      v-if="planted"
13 13
       class="share abs"
14 14
       @share="onShare"
15 15
       @badge="badgeShow = true"
@@ -32,6 +32,7 @@
32 32
   const flowerShow = ref();
33 33
   const planted = ref(false);
34 34
   const badgeShow = ref(false);
35
+  const el = ref();
35 36
 
36 37
   const onMapClick = (country) => {
37 38
     countryRef.value = country;
@@ -47,9 +48,32 @@
47 48
     router.push('/share')
48 49
   }
49 50
 
51
+  onMounted(() => {
52
+    const t = setTimeout(() => {
53
+      // 中国显示正中间
54
+      el.value.scroll(300, 0);
55
+      clearTimeout(t);
56
+    }, 500);
57
+
58
+    // 绘制紫金草
59
+
60
+
61
+  })
62
+
50 63
 </script>
51 64
 
52 65
 <style lang="less">
66
+
67
+.content {
68
+  position: relative;
69
+  overflow: auto;
70
+
71
+  img {
72
+    width: 1330px;
73
+    // 1052
74
+  }
75
+}
76
+
53 77
 .share {
54 78
   bottom: 0;
55 79
   left: 0;

+ 1
- 0
src/pages/pg4/plant.vue Ver fichero

@@ -85,6 +85,7 @@ const animate = (plus, e) => {
85 85
   );
86 86
   e.stopPropagation();
87 87
 };
88
+
88 89
 const isChoise = (name) => {
89 90
   // const
90 91
   //   console.log(name, "==--");