hookehuyr

fix

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: 2024-09-20 11:46:10 4 + * @LastEditTime: 2024-09-20 11:51:29
5 * @FilePath: /map-demo/src/views/bieyuan/map.vue 5 * @FilePath: /map-demo/src/views/bieyuan/map.vue
6 * @Description: 公众地图主体页面 6 * @Description: 公众地图主体页面
7 --> 7 -->
...@@ -350,6 +350,14 @@ export default { ...@@ -350,6 +350,14 @@ export default {
350 if (marker_id) { 350 if (marker_id) {
351 this.$nextTick(() => { 351 this.$nextTick(() => {
352 this.addSafeRoute(this.data_path_list[0]); 352 this.addSafeRoute(this.data_path_list[0]);
353 + // 获取当前 URL 的查询参数
354 + let query = { ...this.$route.query };
355 +
356 + // 删除 marker_id 参数
357 + delete query.marker_id;
358 +
359 + // 使用 Vue Router 更新 URL,并且不刷新页面
360 + this.$router.replace({ query });
353 }); 361 });
354 } 362 }
355 }); 363 });
......