Your Name 2 lat temu
rodzic
commit
1e18d18756

+ 1
- 0
index.html Wyświetl plik

@@ -7,6 +7,7 @@
7 7
     <link rel="stylesheet" href="./fonts/iconfont.css">
8 8
     <link rel="stylesheet" href="./fonts/STXINGKA.css">
9 9
     <script src="./wx/jweixin-1.6.0.js"></script>
10
+    <script src="./qrcode.min.js"></script>
10 11
     <script src="./config.js"></script>
11 12
     <title>和“宁好”一起,跟着诗歌游南京</title>
12 13
   </head>

+ 1
- 0
public/qrcode.min.js
Plik diff jest za duży
Wyświetl plik


+ 2
- 0
src/App.vue Wyświetl plik

@@ -3,6 +3,7 @@ import { computed, onMounted, ref } from 'vue';
3 3
 import Loader from '@/components/Loader.vue';
4 4
 import ScrollDown from '@/components/ScrollDown.vue';
5 5
 import Image from '@/components/Image.vue';
6
+import QrCode from './components/QrCode.vue';
6 7
 import { preload } from '@/utils/preload';
7 8
 import scroll from '@/utils/scroll'
8 9
 
@@ -44,6 +45,7 @@ onMounted(() => {
44 45
 <template>
45 46
   <Loader :loading="loading" :percent="percent" />
46 47
   <ScrollDown />
48
+  <QrCode />
47 49
   <Image v-for="(res, index) in resources" :key="res.image" :resource="res" :index="index"></Image>
48 50
   <img :src="fixedLogo" alt="" class="fixed-log" :class="{ 'hidden': fixedLogoHidden }" @click="onClick">
49 51
 </template>

+ 43
- 0
src/components/CoverBtn.vue Wyświetl plik

@@ -0,0 +1,43 @@
1
+<template>
2
+  <div
3
+    class="cover-btn"
4
+    @click="onClick"
5
+    :style="styleRef"
6
+  >
7
+    <slot></slot>
8
+  </div>
9
+</template>
10
+
11
+<script setup>
12
+import { computed, ref } from 'vue';
13
+
14
+  const props = defineProps({
15
+    center: {
16
+      type: Array,
17
+      default: [],
18
+    },
19
+    width: Number,
20
+    height: Number,
21
+  });
22
+
23
+  const emit = defineEmits(['click']);
24
+
25
+  const styleRef = computed(() => {
26
+    return {
27
+      left: `${props.center[0] - props.width / 2}px`,
28
+      top: `${props.center[1] - props.height / 2}px`,
29
+      width: `${props.width}px`,
30
+      height: `${props.height}px`,
31
+    }
32
+  })
33
+
34
+  const onClick = e => emit('click', e);
35
+</script>
36
+
37
+<style lang="less" scoped>
38
+.cover-btn {
39
+  position: absolute;
40
+  // background: rgba(255, 0, 0, 0.5);
41
+  z-index: 10;
42
+}
43
+</style>

+ 39
- 217
src/components/Image.vue Wyświetl plik

@@ -1,71 +1,40 @@
1 1
 <template>
2 2
   <div class="img-wrapper">
3 3
     <img :src="resource.img.src" @load="onLoad" alt="" />
4
-    <div v-if="showGesture" class="gesture" :style="gestureStyle">
5
-      <i class="iconfont icon-cc-pointer-right"></i>
6
-    </div>
7 4
 
8
-    <div
5
+    <!-- 导航地图 -->
6
+    <NaviMap
9 7
       v-if="resource.showMapBtn"
10
-      class="showmapbtn"
11
-      :style="mapBtnStyle"
12
-      @click="onShowMapBtn"
13
-    ></div>
14
-    <div
15
-      v-if="resource.infoIcon"
16
-      class="info"
17
-      :style="infoStyle"
18
-      @click="onShowInfoBtn"
19
-    >
20
-      <i class="iconfont icon-info"></i>
21
-    </div>
8
+      :center="mapCenter"
9
+      :image="resource.mapImage"
10
+    />
22 11
 
23
-    <div v-if="resource.showMapBtn">
24
-      <div
25
-        v-show="false"
26
-        ref="mapImageRef"
27
-        v-viewer="{
28
-          toolbar: false,
29
-          navbar:false,
30
-          title:false,
31
-          url: 'data-source',
32
-        }"
33
-        class="images clearfix"
34
-      >
35
-        <template v-for="img in resource.mapImage" :key="img">
36
-          <img class="image" :src="img" :data-source="img" />
37
-        </template>
38
-      </div>
39
-    </div>
40
-
41
-    <div
12
+    <!-- 配音 -->
13
+    <ScenicAudio
42 14
       v-if="resource.playBtn"
43
-      class="paybtn"
44
-      :style="btnStyle"
45
-      @click="onPlayBtn"
46
-    >
47
-      <AudioPlayingVue :style="iconStyle" />
48
-      <audio
49
-        :src="resource.audio"
50
-        preload="auto"
51
-        ref="audioRef"
52
-        @ended="onEnded"
53
-      ></audio>
54
-    </div>
55
-
56
-    <PopUpVue :show="showInfo" :info="resource.infoIcon" :onClose="onCloseInfoBtn" />
15
+      :center="playerCenter"
16
+      :audio="resource.audio"
17
+      :show-gesture="resource.showGesture"
18
+    />
19
+
20
+    <template v-if="resource.infoIcon">
21
+      <ScenicDetail
22
+        v-for="(info, inx) in resource.infoIcon"
23
+        :key="`info-${inx}`"
24
+        :center="infoCenters[inx]"
25
+        :info="info"
26
+      />
27
+    </template>
57 28
   </div>
58 29
 </template>
59 30
 
60 31
 <script setup>
61 32
 import { computed, ref, watch } from "vue";
62
-import { useModel } from "@zjxpcyc/vue-tiny-store";
63
-import PopUpVue from "./PopUp.vue";
64 33
 import AudioPlayingVue from "./AudioPlaying.vue";
65
-import "viewerjs/dist/viewer.css";
66
-import { directive as viewer } from "v-viewer";
67
-
68
-const [current, updateCurrent] = useModel("audio");
34
+import CoverBtn from "./CoverBtn.vue";
35
+import NaviMap from "./NaviMap.vue";
36
+import ScenicAudio from "./ScenicAudio.vue";
37
+import ScenicDetail from "./ScenicDetail.vue";
69 38
 
70 39
 const props = defineProps({
71 40
   resource: {
@@ -78,123 +47,31 @@ const props = defineProps({
78 47
   index: Number,
79 48
 });
80 49
 
81
-const showInfo = ref(false)
82
-const mapImageRef = ref();
83
-const mapBtnStyle = ref({});
84
-const btnStyle = ref({});
85
-const gestureStyle = ref({});
86
-const infoStyle = ref({});
87
-const audioRef = ref();
88
-const playState = ref(0);
89
-const showGesture = ref(props.resource.showGesture);
90
-const iconStyle = computed(() => ({
91
-  opacity: playState.value,
92
-}));
50
+const mapCenter = ref([]);
51
+const playerCenter = ref([]);
52
+const infoCenters = ref([]);
93 53
 
94
-const playAudio = () => {
95
-  audioRef.value.play();
96
-  playState.value = 1;
97
-  updateCurrent(props.resource.audio);
98
-
99
-  // 播放一次, 立即消失
100
-  if (showGesture.value) {
101
-    showGesture.value = false;
102
-  }
103
-};
104
-
105
-const stopAudio = () => {
106
-  audioRef.value.pause();
107
-  playState.value = 0;
108
-};
109
-
110
-// 监控全局, 如果非当前播放器, 则停止播放
111
-watch(current, (nw) => {
112
-  if (nw !== props.resource.audio && playState.value === 1) {
113
-    stopAudio();
114
-  }
115
-});
116 54
 
117
-// 点击播放
118
-const onPlayBtn = () => {
119
-  if (playState.value) {
120
-    stopAudio();
121
-  } else {
122
-    playAudio();
123
-  }
124
-};
55
+// 图片加载完成, 设置播放器
56
+const onLoad = (e) => {
57
+  const { width, height, naturalHeight, naturalWidth } = e.target;
58
+  const xRate = width / naturalWidth;
59
+  const yRate = height / naturalHeight;
125 60
 
126
-//显示地图
127
-const onShowMapBtn = () => {
128 61
   if (props.resource.showMapBtn) {
129
-    mapImageRef.value && mapImageRef.value.$viewer.show();
62
+    const { pos } = props.resource.showMapBtn;
63
+    mapCenter.value = [xRate * pos[0], yRate * pos[1]];
130 64
   }
131
-};
132
-
133
-// 显示详情介绍
134
-const onShowInfoBtn = () => {
135
-  showInfo.value=true
136
-};
137
-
138
-const onCloseInfoBtn = () => {
139
-  showInfo.value=false
140
-};
141
-
142 65
 
143
-
144
-// 播放完成
145
-const onEnded = () => {
146
-  stopAudio();
147
-};
148
-
149
-// 图片加载完成, 设置播放器
150
-const onLoad = (e) => {
151 66
   if (props.resource.playBtn) {
152 67
     const { pos } = props.resource.playBtn;
153
-    const { width, height, naturalHeight, naturalWidth } = e.target;
154
-    const d = 32; // 宽度一半
155
-    const centerX = (width * pos[0]) / naturalWidth;
156
-    const centerY = (height * pos[1]) / naturalHeight;
157
-    const x = centerX - d;
158
-    const y = centerY - d;
159
-    btnStyle.value = { left: `${x}px`, top: `${y}px` };
160
-    const d2 = 12; // 字体大小一半
161
-    // 如果显示引导手势, 那么计算坐标
162
-    if (showGesture.value) {
163
-      gestureStyle.value = {
164
-        left: `${x + d2 * 1.5}px`,
165
-        top: `${centerY - d2 * 6}px`,
166
-      };
167
-    }
168
-
169
-    if (props.resource.infoIcon) {
170
-      const pos = props.resource.infoIcon.pos || 'left';
171
-      switch (pos) {
172
-        case 'right':
173
-          infoStyle.value = { left: `${x + d2 * 6}px`, top: `${centerY - d2}px` };
174
-          break;
175
-        case 'top':
176
-          infoStyle.value = { left: `${x + d2}px`, top: `${centerY - d2 * 6}px` };
177
-          break;
178
-        case 'bottom':
179
-          infoStyle.value = { left: `${x + d2}px`, top: `${centerY + d2 * 4}px` };
180
-          break;
181
-        case 'left':
182
-        default:
183
-          infoStyle.value = { left: `${x - d2 * 4}px`, top: `${centerY - d2}px` };
184
-          break;
185
-      }
186
-    }
68
+    playerCenter.value = [xRate * pos[0], yRate * pos[1]];
187 69
   }
188 70
 
189
-  if (props.resource.showMapBtn) {
190
-    const { pos } = props.resource.showMapBtn;
191
-    const { width, height, naturalHeight, naturalWidth } = e.target;
192
-    const d = 32; // 宽度一半
193
-    const centerX = (width * pos[0]) / naturalWidth;
194
-    const centerY = (height * pos[1]) / naturalHeight;
195
-    const x = centerX - d;
196
-    const y = centerY - d;
197
-    mapBtnStyle.value = { left: `${x}px`, top: `${y}px` };
71
+  if (props.resource.infoIcon) {
72
+    infoCenters.value = props.resource.infoIcon.map(info => {
73
+      return [xRate * info.pos[0], yRate * info.pos[1]];
74
+    })
198 75
   }
199 76
 };
200 77
 </script>
@@ -204,61 +81,6 @@ const onLoad = (e) => {
204 81
   margin-top: -0.5px; // 解决 iphone13 白边问题
205 82
   position: relative;
206 83
 
207
-  .gesture {
208
-    position: absolute;
209
-    z-index: 9;
210
-    animation: gestureAnimation 1.6s ease-in-out infinite;
211
-
212
-    .iconfont {
213
-      font-size: 24px;
214
-    }
215
-  }
216
-
217
-  .info {
218
-    position: absolute;
219
-    z-index: 9;
220
-    .iconfont {
221
-      color: #333;
222
-      font-size: 40px;
223
-    }
224
-  }
225
-
226
-  @keyframes gestureAnimation {
227
-    from {
228
-      opacity: 0;
229
-      transform: translateY(0) rotate(90deg);
230
-    }
231
-    to {
232
-      opacity: 1;
233
-      transform: translateY(12px) rotate(90deg);
234
-    }
235
-  }
236
-
237
-  .showmapbtn {
238
-    position: absolute;
239
-    width: 170px;
240
-    height: 70px;
241
-    // background: rgba(255, 0, 0, 0.5);
242
-    z-index: 10;
243
-  }
244
-
245
-  .paybtn {
246
-    position: absolute;
247
-    width: 64px;
248
-    height: 64px;
249
-    // background: rgba(255, 0, 0, 0.5);
250
-    z-index: 10;
251
-
252
-    & > audio {
253
-      max-width: 1px;
254
-      max-height: 1px;
255
-    }
256
-
257
-    .iconfont {
258
-      color: #fff;
259
-    }
260
-  }
261
-
262 84
   img {
263 85
     display: block;
264 86
     width: 100vw;

+ 46
- 0
src/components/NaviMap.vue Wyświetl plik

@@ -0,0 +1,46 @@
1
+<template>
2
+  <CoverBtn
3
+    :center="center"
4
+    :width="width"
5
+    :height="height"
6
+    @click="onShow"
7
+  />
8
+  <div
9
+    v-show="false"
10
+    ref="elRef"
11
+    v-viewer="{
12
+      toolbar: false,
13
+      navbar:false,
14
+      title:false,
15
+      url: 'data-source',
16
+    }"
17
+    class="images clearfix"
18
+  >
19
+    <img class="image" :src="image" :data-source="image" />
20
+  </div>
21
+</template>
22
+
23
+<script setup>
24
+import { computed, onMounted, ref } from 'vue';
25
+  import { useModel } from "@zjxpcyc/vue-tiny-store";
26
+import CoverBtn from "./CoverBtn.vue";
27
+
28
+const props = defineProps({
29
+  center: Array,
30
+  // image: String,
31
+})
32
+
33
+const elRef = ref()
34
+const width = ref(170)
35
+const height = ref(70)
36
+
37
+const [image] = useModel("mapImage");
38
+
39
+const onShow = () => {
40
+    elRef.value.$viewer.show()
41
+}
42
+</script>
43
+
44
+<style lang="less" scoped>
45
+
46
+</style>

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

@@ -69,7 +69,7 @@ watch(() => props.show, (val) => {
69 69
       padding: 0 20px;
70 70
       font-size: 20px;
71 71
       text-indent: 42px;
72
-      margin-top: 50px;
72
+      margin-top: 30px;
73 73
       color: #fff;
74 74
     }
75 75
   }

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

@@ -0,0 +1,55 @@
1
+<template>
2
+  <div class="qrcode-box">
3
+    <div id="qrcode" class="qrcode"></div>
4
+    <canvas class="map-canvas" ref="cvsRef"></canvas>
5
+  </div>
6
+</template>
7
+
8
+<script setup>
9
+import { onMounted, ref } from 'vue';
10
+  import { useModel } from "@zjxpcyc/vue-tiny-store";
11
+import { map } from '../utils/resources';
12
+
13
+const [,changeImage] = useModel("mapImage");
14
+const cvsRef = ref();
15
+
16
+onMounted(() => {
17
+  const qrcode = new QRCode("qrcode");
18
+  qrcode.makeCode(location.origin + origin.path);
19
+
20
+  const qrImage = document.querySelector('#qrcode img');
21
+  const canvas = cvsRef.value;
22
+  
23
+  // 绘制地图 + 二维码
24
+  const mapImage = new Image();
25
+  mapImage.onload = (e) => {
26
+    const { width, height, naturalHeight, naturalWidth } = e.target;
27
+    canvas.width = naturalWidth;
28
+    canvas.height = naturalHeight;
29
+    const ctx = canvas.getContext('2d');
30
+
31
+    // 绘制地图
32
+    ctx.drawImage(mapImage,0,0);
33
+    // 绘制二维码, 160 是二维码的大小
34
+    ctx.drawImage(qrImage, 1000, 2620, 160, 160);
35
+    // 保存到 store
36
+    changeImage(canvas.toDataURL('image/png', 0.9));
37
+  };
38
+  mapImage.src = map;
39
+    
40
+})
41
+</script>
42
+
43
+<style lang="less" scoped>
44
+.qrcode-box {
45
+  position: absolute;
46
+  max-width: 1px;
47
+  max-height: 1px;
48
+  overflow: hidden;
49
+
50
+  .qrcode {
51
+    width:160px;
52
+    height:160px;
53
+  }
54
+}
55
+</style>

+ 128
- 0
src/components/ScenicAudio.vue Wyświetl plik

@@ -0,0 +1,128 @@
1
+<template>
2
+  <CoverBtn
3
+    :center="center"
4
+    :width="width"
5
+    :height="height"
6
+    @click="onPlayBtn"
7
+  >
8
+    <AudioPlaying :style="iconStyle" />
9
+    <audio
10
+      class="spots-audio"
11
+      :src="audio"
12
+      preload="auto"
13
+      ref="audioRef"
14
+      @ended="onEnded"
15
+    ></audio>
16
+  </CoverBtn>
17
+  <div v-if="showGesture" class="gesture" :class="{ hidden: gestureHide }" :style="gestureStyle">
18
+    <i class="iconfont icon-cc-pointer-right"></i>
19
+  </div>
20
+</template>
21
+
22
+<script setup>
23
+  import { computed, watch, ref } from 'vue';
24
+  import { useModel } from "@zjxpcyc/vue-tiny-store";
25
+  import CoverBtn from "./CoverBtn.vue";
26
+  import AudioPlaying from "./AudioPlaying.vue";
27
+
28
+  const props = defineProps({
29
+    center: Array,
30
+    audio: String,
31
+    showGesture: {
32
+      type: Boolean,
33
+      default: false,
34
+    },
35
+  });
36
+
37
+  const emit = defineEmits(['play', 'stop'])
38
+
39
+  const [current, updateCurrent] = useModel("audio");
40
+  
41
+  const width = ref(64);
42
+  const height = ref(64);
43
+  const audioRef = ref();
44
+  const playState = ref(0);
45
+  const gestureHide = ref(false);
46
+  
47
+  const iconStyle = computed(() => ({
48
+    opacity: playState.value,
49
+  }));
50
+
51
+  const gestureStyle = computed(() => {
52
+    if (props.center && props.center.length > 1) {
53
+      return {
54
+        left: `${props.center[0] - width.value}px`,
55
+        top: `${props.center[1] - 12}px`
56
+      }
57
+    } else {
58
+      return {};
59
+    }
60
+  });
61
+  
62
+  const playAudio = () => {
63
+    audioRef.value.play();
64
+    playState.value = 1;
65
+    updateCurrent(props.audio);
66
+    emit('play');
67
+    gestureHide.value = true;
68
+  };
69
+
70
+  const stopAudio = () => {
71
+    audioRef.value.pause();
72
+    playState.value = 0;
73
+    emit('stop')
74
+  };
75
+
76
+  // 监控全局, 如果非当前播放器, 则停止播放
77
+  watch(current, (nw) => {
78
+    if (nw !== props.audio && playState.value === 1) {
79
+      stopAudio();
80
+    }
81
+  });
82
+
83
+  // 点击播放
84
+  const onPlayBtn = () => {
85
+    if (playState.value) {
86
+      stopAudio();
87
+    } else {
88
+      playAudio();
89
+    }
90
+  };
91
+  
92
+  // 播放完成
93
+  const onEnded = () => {
94
+    stopAudio();
95
+  };
96
+</script>
97
+
98
+<style lang="less" scoped>
99
+  .spots-audio {
100
+    max-width: 1px;
101
+    max-height: 1px;
102
+  }
103
+
104
+  .gesture {
105
+    position: absolute;
106
+    z-index: 9;
107
+    animation: gestureAnimation 1.6s ease-in-out infinite;
108
+
109
+    .iconfont {
110
+      font-size: 24px;
111
+    }
112
+
113
+    &.hidden {
114
+      display: none;
115
+    }
116
+  }
117
+
118
+  @keyframes gestureAnimation {
119
+    from {
120
+      opacity: 0;
121
+      transform: translateX(0);
122
+    }
123
+    to {
124
+      opacity: 1;
125
+      transform: translateX(12px);
126
+    }
127
+  }
128
+</style>

+ 36
- 0
src/components/ScenicDetail.vue Wyświetl plik

@@ -0,0 +1,36 @@
1
+<template>
2
+  <CoverBtn
3
+    :center="center"
4
+    :width="width"
5
+    :height="height"
6
+    @click="onShowInfoBtn"
7
+  />
8
+  <PopUpVue :show="showInfo" :info="info" :onClose="onCloseInfoBtn" />
9
+</template>
10
+
11
+<script setup>  
12
+import { computed, ref, watch } from "vue";
13
+  import CoverBtn from "./CoverBtn.vue";
14
+import PopUpVue from "./PopUp.vue";
15
+
16
+const props = defineProps({
17
+  center: Array,
18
+  info: {
19
+    type: Object,
20
+    default: () => ({})
21
+  }
22
+})
23
+
24
+const showInfo = ref(false)
25
+const width = ref(50);
26
+const height = ref(120);
27
+
28
+// 显示详情介绍
29
+const onShowInfoBtn = () => {
30
+  showInfo.value=true
31
+};
32
+
33
+const onCloseInfoBtn = () => {
34
+  showInfo.value=false
35
+};
36
+</script>

+ 11
- 1
src/store/index.js Wyświetl plik

@@ -14,6 +14,16 @@ const useAudio = () => {
14 14
   ]
15 15
 };
16 16
 
17
-const store = createStore({ audio: useAudio });
17
+const useMapImage = () => {
18
+  const image = ref();
19
+  
20
+  const changeImage = (val) => {
21
+    image.value = val;
22
+  }
23
+
24
+  return [image, changeImage];
25
+}
26
+
27
+const store = createStore({ audio: useAudio, mapImage: useMapImage });
18 28
 
19 29
 export default store;

+ 100
- 142
src/utils/resources.js Wyświetl plik

@@ -1,44 +1,8 @@
1
-// import index from '@/assets/index.jpg';
2
-// import mask from '@/assets/mask.png';
3 1
 
4 2
 export const index = "./index.jpg";
5 3
 export const mask = "./mask.png";
6 4
 export const map = "./map.png";
7 5
 
8
-// import img1 from '@/assets/images/1.jpg';
9
-// import img2 from '@/assets/images/2.jpg';
10
-// import img3 from '@/assets/images/3.jpg';
11
-// import img4 from '@/assets/images/4.jpg';
12
-// import img5_1 from '@/assets/images/5-1.jpg';
13
-// import img5_2 from '@/assets/images/5-2.jpg';
14
-// import img5 from '@/assets/images/5.jpg';
15
-// import img6 from '@/assets/images/6.jpg';
16
-// import img7 from '@/assets/images/7.jpg';
17
-// import img8_1 from '@/assets/images/8-1.jpg';
18
-// import img8_2 from '@/assets/images/8-2.jpg';
19
-// import img8 from '@/assets/images/8.jpg';
20
-// import img9 from '@/assets/images/9.jpg';
21
-// import img10_1 from '@/assets/images/10-1.jpg';
22
-// import img10_2 from '@/assets/images/10-2.jpg';
23
-// import img10 from '@/assets/images/10.jpg';
24
-// import img11 from '@/assets/images/11.jpg';
25
-// import img12 from '@/assets/images/12.jpg';
26
-// import img13 from '@/assets/images/13.jpg';
27
-// import img14 from '@/assets/images/14.jpg';
28
-// import img15_1 from '@/assets/images/15-1.jpg';
29
-// import img15_2 from '@/assets/images/15-2.jpg';
30
-// import img15 from '@/assets/images/15.jpg';
31
-// import img16 from '@/assets/images/16.jpg';
32
-// import img17 from '@/assets/images/17.jpg';
33
-// import img18 from '@/assets/images/18.jpg';
34
-// import img19_1 from '@/assets/images/19-1.jpg';
35
-// import img19_2 from '@/assets/images/19-2.jpg';
36
-// import img19 from '@/assets/images/19.jpg';
37
-// import img20 from '@/assets/images/20.jpg';
38
-// import img21 from '@/assets/images/21.jpg';
39
-// import img22 from '@/assets/images/22.jpg';
40
-// import img23 from '@/assets/images/23.jpg';
41
-
42 6
 const infoImage = [
43 7
   "./infoimage/1长江大桥.jpg",
44 8
   "./infoimage/2阅江楼.jpg",
@@ -134,33 +98,6 @@ const images = [
134 98
   "./images/23.jpg",
135 99
 ];
136 100
 
137
-// import audio1 from '@/assets/audios/1南京长江大桥.mp3';
138
-// import audio2 from '@/assets/audios/2阅江楼.mp3';
139
-// import audio3 from '@/assets/audios/3秦淮河.mp3';
140
-// import audio4 from '@/assets/audios/4乌衣巷.mp3';
141
-// import audio5 from '@/assets/audios/5燕子矶.mp3';
142
-// import audio6 from '@/assets/audios/6栖霞山.mp3';
143
-// import audio7 from '@/assets/audios/7朝天宫.mp3';
144
-// import audio8 from '@/assets/audios/8梁洲.mp3';
145
-// import audio9 from '@/assets/audios/9后湖映月.mp3';
146
-// import audio10 from '@/assets/audios/10台城.mp3';
147
-// import audio11 from '@/assets/audios/11十里堤.mp3';
148
-// import audio12 from '@/assets/audios/12石头城.mp3';
149
-// import audio13 from '@/assets/audios/13莫愁湖公园.mp3';
150
-// import audio14 from '@/assets/audios/14赏心亭.mp3';
151
-// import audio15 from '@/assets/audios/15长干里.mp3';
152
-// import audio16 from '@/assets/audios/16大报恩寺.mp3';
153
-// import audio17 from '@/assets/audios/17凤凰台.mp3';
154
-// import audio18 from '@/assets/audios/18桃叶渡.mp3';
155
-// import audio19 from '@/assets/audios/19雨花台.mp3';
156
-// import audio20 from '@/assets/audios/20牛首山.mp3';
157
-// import audio21 from '@/assets/audios/21石臼湖.mp3';
158
-// import audio22 from '@/assets/audios/22东山.mp3';
159
-// import audio23 from '@/assets/audios/23瞻园.mp3';
160
-// import audio24 from '@/assets/audios/24白鹭洲.mp3';
161
-// import audio25 from '@/assets/audios/25随园.mp3';
162
-// import audio26 from '@/assets/audios/26世界文学客厅.mp3';
163
-
164 101
 const audios = [
165 102
   './audios/1南京长江大桥.mp3',
166 103
   './audios/2阅江楼.mp3',
@@ -211,9 +148,9 @@ export const resources = [
211 148
   {
212 149
     image: images[1],
213 150
     showMapBtn: {
214
-      pos: [280, 1250],
151
+      pos: [380, 1265],
215 152
     },
216
-    mapImage: [map],
153
+    mapImage: map,
217 154
   },
218 155
   {
219 156
     image: infoImage[0],
@@ -225,11 +162,12 @@ export const resources = [
225 162
       pos: [616, 932],
226 163
     },
227 164
     showGesture: true,
228
-    infoIcon: {
165
+    audio: audios[0],
166
+    infoIcon: [{
167
+      pos: [264, 697],
229 168
       image: infoImage[0],
230 169
       content: infoTexts[0],
231
-    },
232
-    audio: audios[0],
170
+    }],
233 171
   },
234 172
   {
235 173
     image: images[3],
@@ -237,11 +175,11 @@ export const resources = [
237 175
       pos: [100, 406],
238 176
     },
239 177
     audio: audios[1],
240
-    infoIcon: {
178
+    infoIcon: [{
179
+      pos: [480, 216],
241 180
       image: infoImage[1],
242 181
       content: infoTexts[1],
243
-      pos: 'top',
244
-    },
182
+    }],
245 183
   },
246 184
   {
247 185
     image: images[4],
@@ -249,11 +187,11 @@ export const resources = [
249 187
       pos: [650, 172],
250 188
     },
251 189
     audio: audios[2],
252
-    infoIcon: {
190
+    infoIcon: [{
253 191
       image: infoImage[2],
254 192
       content: infoTexts[2],
255
-      pos: 'bottom',
256
-    },
193
+      pos: [85, 49],
194
+    }],
257 195
   },
258 196
   {
259 197
     image: images[5],
@@ -261,11 +199,11 @@ export const resources = [
261 199
       pos: [652, 773],
262 200
     },
263 201
     audio: audios[3],
264
-    infoIcon: {
202
+    infoIcon: [{
265 203
       image: infoImage[3],
266 204
       content: infoTexts[3],
267
-      pos: 'bottom',
268
-    },
205
+      pos: [94, 634],
206
+    }],
269 207
   },
270 208
   // {
271 209
   //   image: img5,
@@ -276,10 +214,11 @@ export const resources = [
276 214
       pos: [624, 890],
277 215
     },
278 216
     audio: audios[4],
279
-    infoIcon: {
217
+    infoIcon: [{
280 218
       image: infoImage[4],
281 219
       content: infoTexts[4],
282
-    },
220
+      pos: [522, 352],
221
+    }],
283 222
   },
284 223
   {
285 224
     image: images[7],
@@ -287,10 +226,11 @@ export const resources = [
287 226
       pos: [612, 486],
288 227
     },
289 228
     audio: audios[5],
290
-    infoIcon: {
229
+    infoIcon: [{
291 230
       image: infoImage[5],
292 231
       content: infoTexts[5],
293
-    },
232
+      pos: [183, 223],
233
+    }],
294 234
   },
295 235
   {
296 236
     image: images[8],
@@ -298,11 +238,11 @@ export const resources = [
298 238
       pos: [93, 557],
299 239
     },
300 240
     audio: audios[6],
301
-    infoIcon: {
241
+    infoIcon: [{
302 242
       image: infoImage[6],
303 243
       content: infoTexts[6],
304
-      pos: 'right',
305
-    },
244
+      pos: [616, 118],
245
+    }],
306 246
   },
307 247
   {
308 248
     image: images[9],
@@ -310,11 +250,11 @@ export const resources = [
310 250
       pos: [163, 224],
311 251
     },
312 252
     audio: audios[7],
313
-    infoIcon: {
253
+    infoIcon: [{
314 254
       image: infoImage[7],
315 255
       content: infoTexts[7],
316
-      pos: 'right',
317
-    },
256
+      pos: [582, 348],
257
+    }],
318 258
   },
319 259
   // {
320 260
   //   image: img8,
@@ -325,10 +265,11 @@ export const resources = [
325 265
       pos: [152, 782],
326 266
     },
327 267
     audio: audios[8],
328
-    infoIcon: {
268
+    infoIcon: [{
329 269
       image: infoImage[8],
330 270
       content: infoTexts[8],
331
-    },
271
+      pos: [612, 540],
272
+    }],
332 273
   },
333 274
   {
334 275
     image: images[11],
@@ -336,11 +277,11 @@ export const resources = [
336 277
       pos: [662, 380],
337 278
     },
338 279
     audio: audios[9],
339
-    infoIcon: {
280
+    infoIcon: [{
340 281
       image: infoImage[9],
341 282
       content: infoTexts[9],
342
-      pos: 'top',
343
-    },
283
+      pos: [145, 137],
284
+    }],
344 285
   },
345 286
   {
346 287
     image: images[12],
@@ -348,10 +289,11 @@ export const resources = [
348 289
       pos: [646, 225],
349 290
     },
350 291
     audio: audios[10],
351
-    infoIcon: {
292
+    infoIcon: [{
352 293
       image: infoImage[10],
353 294
       content: infoTexts[10],
354
-    },
295
+      pos: [86, 496],
296
+    }],
355 297
   },
356 298
   // {
357 299
   //   image: img10,
@@ -362,11 +304,11 @@ export const resources = [
362 304
       pos: [574, 1074],
363 305
     },
364 306
     audio: audios[11],
365
-    infoIcon: {
307
+    infoIcon: [{
366 308
       image: infoImage[11],
367 309
       content: infoTexts[11],
368
-      pos: 'bottom',
369
-    },
310
+      pos: [699, 610],
311
+    }],
370 312
   },
371 313
   {
372 314
     image: images[14],
@@ -374,11 +316,11 @@ export const resources = [
374 316
       pos: [132, 550],
375 317
     },
376 318
     audio: audios[12],
377
-    infoIcon: {
319
+    infoIcon: [{
378 320
       image: infoImage[12],
379 321
       content: infoTexts[12],
380
-      pos: 'bottom',
381
-    },
322
+      pos: [593, 574],
323
+    }],
382 324
   },
383 325
   {
384 326
     image: images[15],
@@ -386,10 +328,15 @@ export const resources = [
386 328
       pos: [642, 310],
387 329
     },
388 330
     audio: audios[13],
389
-    infoIcon: {
331
+    infoIcon: [{
390 332
       image: infoImage[13],
391 333
       content: infoTexts[13],
392
-    },
334
+      pos: [66, 140],
335
+    },{
336
+      image: infoImage[14],
337
+      content: infoTexts[14],
338
+      pos: [253, 1161],
339
+    }]
393 340
   },
394 341
   {
395 342
     image: images[16],
@@ -397,11 +344,16 @@ export const resources = [
397 344
       pos: [92, 80],
398 345
     },
399 346
     audio: audios[14],
400
-    infoIcon: {
401
-      image: infoImage[14],
402
-      content: infoTexts[14],
403
-      pos: 'bottom',
404
-    },
347
+    // infoIcon: {
348
+    //   image: infoImage[14],
349
+    //   content: infoTexts[14],
350
+    //   pos: 'bottom',
351
+    // },
352
+    infoIcon: [{
353
+      image: infoImage[15],
354
+      content: infoTexts[15],
355
+      pos: [657, 948],
356
+    }],
405 357
   },
406 358
   {
407 359
     image: images[17],
@@ -409,11 +361,11 @@ export const resources = [
409 361
       pos: [652, 31],
410 362
     },
411 363
     audio: audios[15],
412
-    infoIcon: {
413
-      image: infoImage[15],
414
-      content: infoTexts[15],
415
-      pos: 'bottom',
416
-    },
364
+    // infoIcon: {
365
+    //   image: infoImage[15],
366
+    //   content: infoTexts[15],
367
+    //   pos: [657, 948],
368
+    // },
417 369
   },
418 370
   {
419 371
     image: images[18],
@@ -421,11 +373,11 @@ export const resources = [
421 373
       pos: [652, 353],
422 374
     },
423 375
     audio: audios[16],
424
-    infoIcon: {
376
+    infoIcon: [{
425 377
       image: infoImage[16],
426 378
       content: infoTexts[16],
427
-      pos: 'bottom',
428
-    },
379
+      pos: [347, 610],
380
+    }],
429 381
   },
430 382
   // {
431 383
   //   image: img15,
@@ -436,11 +388,11 @@ export const resources = [
436 388
       pos: [166, 600],
437 389
     },
438 390
     audio: audios[17],
439
-    infoIcon: {
391
+    infoIcon: [{
440 392
       image: infoImage[17],
441 393
       content: infoTexts[17],
442
-      pos: 'right',
443
-    },
394
+      pos: [668, 553],
395
+    }],
444 396
   },
445 397
   {
446 398
     image: images[20],
@@ -448,11 +400,11 @@ export const resources = [
448 400
       pos: [364, 606],
449 401
     },
450 402
     audio: audios[18],
451
-    infoIcon: {
403
+    infoIcon: [{
452 404
       image: infoImage[18],
453 405
       content: infoTexts[18],
454
-      pos: 'top',
455
-    },
406
+      pos: [123, 529],
407
+    }],
456 408
   },
457 409
   {
458 410
     image: images[21],
@@ -460,11 +412,15 @@ export const resources = [
460 412
       pos: [386, 472],
461 413
     },
462 414
     audio: audios[19],
463
-    infoIcon: {
415
+    infoIcon: [{
464 416
       image: infoImage[19],
465 417
       content: infoTexts[19],
466
-      pos: 'bottom',
467
-    },
418
+      pos: [151, 251],
419
+    },{
420
+      image: infoImage[20],
421
+      content: infoTexts[20],
422
+      pos: [160, 1244],
423
+    }]
468 424
   },
469 425
   {
470 426
     image: images[22],
@@ -472,11 +428,11 @@ export const resources = [
472 428
       pos: [132, 367],
473 429
     },
474 430
     audio: audios[20],
475
-    infoIcon: {
476
-      image: infoImage[20],
477
-      content: infoTexts[20],
478
-      pos: 'bottom',
479
-    },
431
+    // infoIcon: {
432
+    //   image: infoImage[20],
433
+    //   content: infoTexts[20],
434
+    //   pos: 'bottom',
435
+    // },
480 436
   },
481 437
   {
482 438
     image: images[23],
@@ -484,10 +440,11 @@ export const resources = [
484 440
       pos: [250, 699],
485 441
     },
486 442
     audio: audios[21],
487
-    infoIcon: {
443
+    infoIcon: [{
488 444
       image: infoImage[21],
489 445
       content: infoTexts[21],
490
-    },
446
+      pos: [690, 423],
447
+    }],
491 448
   },
492 449
   // {
493 450
   //   image: img19,
@@ -498,11 +455,11 @@ export const resources = [
498 455
       pos: [152, 1040],
499 456
     },
500 457
     audio: audios[22],
501
-    infoIcon: {
458
+    infoIcon: [{
502 459
       image: infoImage[22],
503 460
       content: infoTexts[22],
504
-      pos: 'right',
505
-    },
461
+      pos: [142, 852],
462
+    }],
506 463
   },
507 464
   {
508 465
     image: images[25],
@@ -510,11 +467,11 @@ export const resources = [
510 467
       pos: [172, 835],
511 468
     },
512 469
     audio: audios[23],
513
-    infoIcon: {
470
+    infoIcon: [{
514 471
       image: infoImage[23],
515 472
       content: infoTexts[23],
516
-      pos: 'right',
517
-    },
473
+      pos: [169, 627],
474
+    }],
518 475
   },
519 476
   {
520 477
     image: images[26],
@@ -522,11 +479,11 @@ export const resources = [
522 479
       pos: [98, 196],
523 480
     },
524 481
     audio: audios[24],
525
-    infoIcon: {
482
+    infoIcon: [{
526 483
       image: infoImage[24],
527 484
       content: infoTexts[24],
528
-      pos: 'right',
529
-    },
485
+      pos: [93, 494],
486
+    }],
530 487
   },
531 488
   {
532 489
     image: images[27],
@@ -534,9 +491,10 @@ export const resources = [
534 491
       pos: [160, 64],
535 492
     },
536 493
     audio: audios[25],
537
-    infoIcon: {
494
+    infoIcon: [{
538 495
       image: infoImage[25],
539 496
       content: infoTexts[25],
540
-    },
497
+      pos: [586, 285],
498
+    }],
541 499
   },
542 500
 ];