Showing
2 changed files
with
20 additions
and
3 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-09-15 22:08:49 | 2 | * @Date: 2024-09-15 22:08:49 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-09-23 14:55:02 | 4 | + * @LastEditTime: 2024-09-23 15:43:14 |
| 5 | * @FilePath: /map-demo/src/views/bieyuan/info.vue | 5 | * @FilePath: /map-demo/src/views/bieyuan/info.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -61,6 +61,12 @@ | ... | @@ -61,6 +61,12 @@ |
| 61 | <div class="info-logo"> | 61 | <div class="info-logo"> |
| 62 | <van-image width="3rem" height="3rem" fit="contain" src="https://cdn.ipadbiz.cn/bieyuan/map/icon/scan_logo.png" /> | 62 | <van-image width="3rem" height="3rem" fit="contain" src="https://cdn.ipadbiz.cn/bieyuan/map/icon/scan_logo.png" /> |
| 63 | </div> | 63 | </div> |
| 64 | + | ||
| 65 | + <van-toast v-model:show="show_toast" style="padding: 0"> | ||
| 66 | + <template #message> | ||
| 67 | + <p style="padding: 0.5rem 1rem;">{{ toast_text }}</p> | ||
| 68 | + </template> | ||
| 69 | + </van-toast> | ||
| 64 | </div> | 70 | </div> |
| 65 | </template> | 71 | </template> |
| 66 | 72 | ||
| ... | @@ -192,7 +198,18 @@ const outerStopAudio = () => { | ... | @@ -192,7 +198,18 @@ const outerStopAudio = () => { |
| 192 | } | 198 | } |
| 193 | 199 | ||
| 194 | const emit = defineEmits(["closeFloat", 'route']); | 200 | const emit = defineEmits(["closeFloat", 'route']); |
| 201 | + | ||
| 202 | +const show_toast = ref(false); | ||
| 203 | +const toast_text = ref(''); | ||
| 204 | + | ||
| 195 | const goTo = () => { // 打开标记地图显示 | 205 | const goTo = () => { // 打开标记地图显示 |
| 206 | + // 没有关联导航提示 | ||
| 207 | + if (page_details.value.path.length <= 1) { | ||
| 208 | + show_toast.value = true; | ||
| 209 | + toast_text.value = '该标记点没有关联导航'; | ||
| 210 | + return; | ||
| 211 | + } | ||
| 212 | + // | ||
| 196 | if ($router.currentRoute.value.path === '/bieyuan/info') { // 详情页 | 213 | if ($router.currentRoute.value.path === '/bieyuan/info') { // 详情页 |
| 197 | $router.push({ | 214 | $router.push({ |
| 198 | path: '/bieyuan/map', | 215 | path: '/bieyuan/map', |
| ... | @@ -205,7 +222,7 @@ const goTo = () => { // 打开标记地图显示 | ... | @@ -205,7 +222,7 @@ const goTo = () => { // 打开标记地图显示 |
| 205 | // | 222 | // |
| 206 | emit("closeFloat", false); | 223 | emit("closeFloat", false); |
| 207 | // | 224 | // |
| 208 | - emit("route", {name: 'marker', path: page_details.value.path}); | 225 | + emit("route", {name: '参观路径', path: page_details.value.path}); |
| 209 | } | 226 | } |
| 210 | } | 227 | } |
| 211 | 228 | ... | ... |
| ... | @@ -391,7 +391,7 @@ export default { | ... | @@ -391,7 +391,7 @@ export default { |
| 391 | this.$nextTick(() => { | 391 | this.$nextTick(() => { |
| 392 | let marker = this.navBarList[0]['list'].filter(item => item.id == marker_id) | 392 | let marker = this.navBarList[0]['list'].filter(item => item.id == marker_id) |
| 393 | let path = marker[0].path; | 393 | let path = marker[0].path; |
| 394 | - this.addSafeRoute({name: 'marker', path}); | 394 | + this.addSafeRoute({name: '参观路径', path}); |
| 395 | // 获取当前 URL 的查询参数 | 395 | // 获取当前 URL 的查询参数 |
| 396 | let query = { ...this.$route.query }; | 396 | let query = { ...this.$route.query }; |
| 397 | 397 | ... | ... |
-
Please register or login to post a comment