hookehuyr

fix

...@@ -184,10 +184,12 @@ export default { ...@@ -184,10 +184,12 @@ export default {
184 this.voice_play(this.info.details[this.isActive]['audio'], 0) 184 this.voice_play(this.info.details[this.isActive]['audio'], 0)
185 this.changeAudioSrc(this.audio.src); 185 this.changeAudioSrc(this.audio.src);
186 this.changeAudioStatus('play'); 186 this.changeAudioStatus('play');
187 + this.$emit('onPlay', this.info.name)
187 }, 188 },
188 pause() { 189 pause() {
189 this.voice_pause(); 190 this.voice_pause();
190 this.changeAudioStatus('pause'); 191 this.changeAudioStatus('pause');
192 + this.$emit('onPause', this.info.name)
191 }, 193 },
192 // 声音播放 194 // 声音播放
193 voice_play(src, index) { 195 voice_play(src, index) {
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
14 </div> 14 </div>
15 <div class="van-hairline--top" style="margin: 1rem 0;"> 15 <div class="van-hairline--top" style="margin: 1rem 0;">
16 <div @click="goToLocation()" style="width: 100%; float: left; text-align: center; margin-top: 1rem;"> 16 <div @click="goToLocation()" style="width: 100%; float: left; text-align: center; margin-top: 1rem;">
17 - <van-icon name="https://cdn.ipadbiz.cn/xys/map/%E5%89%8D%E5%BE%80@2x.png" size="1.5rem" color="#FFF" 17 + <van-icon name="https://cdn.ipadbiz.cn/xys/map/%E5%89%8D%E5%BE%80@2x.png" size="1.25rem" color="#FFF"
18 style="vertical-align: bottom;" />&nbsp; 18 style="vertical-align: bottom;" />&nbsp;
19 - <span style="color: #AB8F57; font-size: 1.1rem;">前往</span> 19 + <span style="color: #AB8F57; font-size: 1rem;">前往</span>
20 </div> 20 </div>
21 </div> 21 </div>
22 </div> 22 </div>
...@@ -112,14 +112,16 @@ export default { ...@@ -112,14 +112,16 @@ export default {
112 box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4); 112 box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
113 text-align: left; 113 text-align: left;
114 border-radius: 5px; 114 border-radius: 5px;
115 - padding: 1.5rem 1.25rem; 115 + padding: 1rem 1.25rem;
116 overflow: auto; 116 overflow: auto;
117 117
118 .info-text { 118 .info-text {
119 - width: 100%; 119 + // width: 100%;
120 line-height: 1.5; 120 line-height: 1.5;
121 float: left; 121 float: left;
122 color: #7A6C6C; 122 color: #7A6C6C;
123 + font-size: 0.9rem;
124 + padding: 0.5rem 0;
123 } 125 }
124 .info-text-audio { 126 .info-text-audio {
125 width: 80%; 127 width: 80%;
......
1 <!-- 1 <!--
2 * @Date: 2023-05-19 14:54:27 2 * @Date: 2023-05-19 14:54:27
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-06-28 15:43:08 4 + * @LastEditTime: 2023-06-28 16:39:41
5 * @FilePath: /map-demo/src/views/index.vue 5 * @FilePath: /map-demo/src/views/index.vue
6 * @Description: 地图主体页面 6 * @Description: 地图主体页面
7 --> 7 -->
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
78 <!-- 自定义组件InfoWindow,初始时需要隐藏 --> 78 <!-- 自定义组件InfoWindow,初始时需要隐藏 -->
79 <!-- 隐藏不要使用v-if,因为我们需要渲染完成后的原生html结构作为信息框的dom对象使用 --> 79 <!-- 隐藏不要使用v-if,因为我们需要渲染完成后的原生html结构作为信息框的dom对象使用 -->
80 <InfoWindow v-show="showInfoWindow" ref="infoWindow" :info-window="infoWindow" :info="itemInfo" :rect="rect" 80 <InfoWindow v-show="showInfoWindow" ref="infoWindow" :info-window="infoWindow" :info="itemInfo" :rect="rect"
81 - @onLocation="infoWindowLocation"></InfoWindow> 81 + @onLocation="infoWindowLocation" @onPlay="onPlay" @onPause="onPause"></InfoWindow>
82 <InfoWindowLite v-show="showInfoWindowLite" ref="infoWindowLite" :info-window="infoWindowLite" :info="itemInfo" 82 <InfoWindowLite v-show="showInfoWindowLite" ref="infoWindowLite" :info-window="infoWindowLite" :info="itemInfo"
83 :rect="rect" @onLocation="infoWindowLocation"></InfoWindowLite> 83 :rect="rect" @onLocation="infoWindowLocation"></InfoWindowLite>
84 <InfoWindowWarn v-show="showInfoWindowWarn" ref="infoWindowWarn" :info-window="infoWindowWarn" :info="itemInfo" 84 <InfoWindowWarn v-show="showInfoWindowWarn" ref="infoWindowWarn" :info-window="infoWindowWarn" :info="itemInfo"
...@@ -1076,8 +1076,49 @@ export default { ...@@ -1076,8 +1076,49 @@ export default {
1076 zoomEnable: true 1076 zoomEnable: true
1077 }); 1077 });
1078 } 1078 }
1079 - } 1079 + },
1080 + onPlay (name) {
1081 + // var zoomStyleMapping = { 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0, 20: 0 };
1082 + // _.each(coord.spotInfo, (x, i) => {
1083 + // var marker = new AMap.ElasticMarker({
1084 + // position: coord.spotInfo[i].position,
1085 + // zooms: [17, 19],
1086 + // styles: [{
1087 + // icon: {
1088 + // img: x.name !== name ?coord.spotInfo[i].icon : 'https://cdn.ipadbiz.cn/xys/map/%E6%92%AD%E6%94%BE%E6%9A%82%E5%81%9C@2x.png',
1089 + // size: [28, 28], // 可见区域的大小
1090 + // anchor: 'bottom-center', // 锚点
1091 + // fitZoom: 14, // 最合适的级别
1092 + // scaleFactor: 2, // 地图放大一级的缩放比例系数
1093 + // maxScale: 1.4, // 最大放大比例
1094 + // minScale: 0.8 // 最小放大比例
1095 + // },
1096 + // label: {
1097 + // content: coord.spotInfo[i].name,
1098 + // position: 'TM',
1099 + // // position: 'BM',
1100 + // // offset: new AMap.Pixel(0, 10),
1101 + // minZoom: 18
1102 + // }
1103 + // }, {
1104 + // icon: {},
1105 + // label: {}
1106 + // }],
1107 + // zoomStyleMapping: coord.spotInfo[i].zoom ? coord.spotInfo[i].zoom : zoomStyleMapping
1108 + // });
1109 + // if (clickListener) {
1110 + // marker.off('click', clickListener)
1111 + // }
1112 + // // 绑定景点的点击事件 - 文字出现才能触发
1113 + // var clickListener = marker.on('click', (e) => {
1114 + // this.positionMarker(coord.spotInfo[i]);
1115 + // })
1080 1116
1117 + // this.spotInfo.push(marker);
1118 + // })
1119 + // this.map.add(this.spotInfo);
1120 + },
1121 + onPause (name) {},
1081 } 1122 }
1082 } 1123 }
1083 </script> 1124 </script>
......