hookehuyr

fix 导航细节优化

<!--
* @Date: 2024-09-15 22:08:49
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-09-23 14:55:02
* @LastEditTime: 2024-09-23 15:43:14
* @FilePath: /map-demo/src/views/bieyuan/info.vue
* @Description: 文件描述
-->
......@@ -61,6 +61,12 @@
<div class="info-logo">
<van-image width="3rem" height="3rem" fit="contain" src="https://cdn.ipadbiz.cn/bieyuan/map/icon/scan_logo.png" />
</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>
......@@ -192,7 +198,18 @@ const outerStopAudio = () => {
}
const emit = defineEmits(["closeFloat", 'route']);
const show_toast = ref(false);
const toast_text = ref('');
const goTo = () => { // 打开标记地图显示
// 没有关联导航提示
if (page_details.value.path.length <= 1) {
show_toast.value = true;
toast_text.value = '该标记点没有关联导航';
return;
}
//
if ($router.currentRoute.value.path === '/bieyuan/info') { // 详情页
$router.push({
path: '/bieyuan/map',
......@@ -205,7 +222,7 @@ const goTo = () => { // 打开标记地图显示
//
emit("closeFloat", false);
//
emit("route", {name: 'marker', path: page_details.value.path});
emit("route", {name: '参观路径', path: page_details.value.path});
}
}
......
......@@ -391,7 +391,7 @@ export default {
this.$nextTick(() => {
let marker = this.navBarList[0]['list'].filter(item => item.id == marker_id)
let path = marker[0].path;
this.addSafeRoute({name: 'marker', path});
this.addSafeRoute({name: '参观路径', path});
// 获取当前 URL 的查询参数
let query = { ...this.$route.query };
......