Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
map-demo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-11-06 11:11:37 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0d5e73155d7b601d00fe2f4cc7c2d88f98866eb5
0d5e7315
1 parent
ba04361c
别院地图的主页和详情页标题从接口获取
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
src/views/bieyuan/info.vue
src/views/bieyuan/map.vue
src/views/bieyuan/info.vue
View file @
0d5e731
<!--
* @Date: 2024-09-15 22:08:49
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-1
0-30 17:06:05
* @LastEditTime: 2024-1
1-06 11:08:47
* @FilePath: /map-demo/src/views/bieyuan/info.vue
* @Description: 文件描述
-->
...
...
@@ -85,12 +85,12 @@
</template>
<script setup>
import { ref, watch } from 'vue'
import { ref, watch
, watchEffect
} from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { showImagePreview } from 'vant';
import { storeToRefs } from 'pinia'
import { mainStore } from '@/store';
import audioPlayList from '@/components/audioList.vue'
import { mainStore, useTitle } from '@/utils/generatePackage'
import $ from 'jquery';
...
...
@@ -246,8 +246,14 @@ onMounted(async () => {
});
}, 500);
}
// 地图标题
document.title = page_details.value.name;
});
// watchEffect(
// () => useTitle(page_details.value.name) // 地图标题
// )
onUnmounted(() => { // 离开页面时关闭音频播放
audio.value.pause();
store.changeAudioStatus('pause');
...
...
src/views/bieyuan/map.vue
View file @
0d5e731
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-1
0-18 09:25:02
* @LastEditTime: 2024-1
1-06 10:53:45
* @FilePath: /map-demo/src/views/bieyuan/map.vue
* @Description: 公众地图主体页面
-->
...
...
@@ -251,6 +251,8 @@ export default {
})
}
}
// 地图标题
document.title = data.map.map_title;
// 初始化地图
this.initMap();
// this.setMapBoundary();
...
...
@@ -602,9 +604,9 @@ export default {
var polygon = new AMap.Polygon({
pathL: pathArray,
strokeColor: "#fcfbf
a
",
strokeColor: "#fcfbf
9
",
strokeWeight: 2,
fillColor: "#fcfbf
a
",
fillColor: "#fcfbf
9
",
fillOpacity: 1,
})
...
...
Please
register
or
login
to post a comment