hookehuyr

fix 详情页返回首页

<!--
* @Date: 2024-09-15 22:08:49
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-09-25 14:07:44
* @LastEditTime: 2024-09-25 17:10:16
* @FilePath: /map-demo/src/views/bieyuan/info.vue
* @Description: 文件描述
-->
......@@ -193,6 +193,7 @@ onMounted(async () => {
showImagePreview({
images: [$(img).attr('src')],
startPosition: 0,
showIndex: false,
onClose: () => {
// console.log('close');
}
......@@ -243,8 +244,13 @@ const goTo = () => { // 打开标记地图显示
}
}
const goBack = () => {
$router.go(-1);
const goBack = () => { // 返回首页
$router.push({
path: '/bieyuan/map',
query: {
id: $route.query.id,
}
})
}
const showBack = computed(() => $router.currentRoute.value.path === '/bieyuan/info');
......@@ -273,6 +279,7 @@ const clickTab = (evt) => { // 标签切换
showImagePreview({
images: [$(img).attr('src')],
startPosition: 0,
showIndex: false,
onClose: () => {
// console.log('close');
}
......