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-09-22 13:44:22 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e750d80826c0b9ffb7759d0dece0e2a820deaff7
e750d808
1 parent
7c2593f9
详情页数据查询后显示调整
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
src/views/bieyuan/info.vue
src/views/bieyuan/map.vue
src/views/bieyuan/info.vue
View file @
e750d80
This diff is collapsed. Click to expand it.
src/views/bieyuan/map.vue
View file @
e750d80
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-09-2
1 12:03:00
* @LastEditTime: 2024-09-2
2 13:43:45
* @FilePath: /map-demo/src/views/bieyuan/map.vue
* @Description: 公众地图主体页面
-->
...
...
@@ -42,7 +42,7 @@
<button @click="show = false">关闭</button>
</div>
</template> -->
<page-info ref="pageInfo" @close-float="onCloseFloat" @route="onRoute"></page-info>
<page-info ref="pageInfo"
:info="itemInfo"
@close-float="onCloseFloat" @route="onRoute"></page-info>
<!-- <div v-if="showClose" @click="closeFloatPanel" class="close-float-panel">
<van-icon name="arrow-left" color="#FFF" size="1.5rem" />
</div> -->
...
...
@@ -72,6 +72,12 @@
</div>
</div>
</div>
<van-toast v-model:show="show_toast" style="padding: 0">
<template #message>
<p style="padding: 0.5rem 1rem;">{{ toast_text }}</p>
</template>
</van-toast>
</div>
</template>
...
...
@@ -217,6 +223,8 @@ export default {
route_safe_marker: [],
show_walk_route: true,
open_current_location: true,
show_toast: false,
toast_text: '',
}
},
async mounted() {
...
...
@@ -358,6 +366,14 @@ export default {
// console.warn(e);
this.itemInfo = entity_info[i];
// 详情为空提示
if (!this.itemInfo.details.length) {
this.show_toast = true;
this.toast_text = '该景点暂无详情'
return;
}
// 打开浮动面板
this.info_height = (0.45 * window.innerHeight);
// 浮动面板样式
...
...
@@ -368,8 +384,8 @@ export default {
this.map.setZoomAndCenter(this.zoom, this.itemInfo.position);
})
}
// TODO: ID问题看看实际名称叫什么
// 导航路径
console.warn(entity_info[i]);
let marker_id = this.$route.query.marker_id;
if (marker_id) {
this.$nextTick(() => {
...
...
@@ -615,7 +631,7 @@ export default {
// 还原样式
this.resetMarkStyle();*/
},
scanQrcode() {
scanQrcode() {
// 扫码跳转详情页
wx.scanQRCode({
needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码,默认二者都有
...
...
@@ -648,6 +664,7 @@ export default {
path: '/bieyuan/info',
query: {
id: this.$route.query.id,
marker_id: this.itemInfo.id
}
})
} else {
...
...
@@ -777,6 +794,8 @@ export default {
console.warn(marker_id);
// 模拟新增路线
this.addSafeRoute(this.data_path_list[0]);
// 定位到当前位置中心
this.map.setZoomAndCenter(this.zoom, this.data_center);
},
handleLocation(status) { // 打开/关闭 当前定位
if (status) {
...
...
Please
register
or
login
to post a comment