hookehuyr

fix 详情页返回首页

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-25 14:07:44 4 + * @LastEditTime: 2024-09-25 17:10:16
5 * @FilePath: /map-demo/src/views/bieyuan/info.vue 5 * @FilePath: /map-demo/src/views/bieyuan/info.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -193,6 +193,7 @@ onMounted(async () => { ...@@ -193,6 +193,7 @@ onMounted(async () => {
193 showImagePreview({ 193 showImagePreview({
194 images: [$(img).attr('src')], 194 images: [$(img).attr('src')],
195 startPosition: 0, 195 startPosition: 0,
196 + showIndex: false,
196 onClose: () => { 197 onClose: () => {
197 // console.log('close'); 198 // console.log('close');
198 } 199 }
...@@ -243,8 +244,13 @@ const goTo = () => { // 打开标记地图显示 ...@@ -243,8 +244,13 @@ const goTo = () => { // 打开标记地图显示
243 } 244 }
244 } 245 }
245 246
246 -const goBack = () => { 247 +const goBack = () => { // 返回首页
247 - $router.go(-1); 248 + $router.push({
249 + path: '/bieyuan/map',
250 + query: {
251 + id: $route.query.id,
252 + }
253 + })
248 } 254 }
249 255
250 const showBack = computed(() => $router.currentRoute.value.path === '/bieyuan/info'); 256 const showBack = computed(() => $router.currentRoute.value.path === '/bieyuan/info');
...@@ -273,6 +279,7 @@ const clickTab = (evt) => { // 标签切换 ...@@ -273,6 +279,7 @@ const clickTab = (evt) => { // 标签切换
273 showImagePreview({ 279 showImagePreview({
274 images: [$(img).attr('src')], 280 images: [$(img).attr('src')],
275 startPosition: 0, 281 startPosition: 0,
282 + showIndex: false,
276 onClose: () => { 283 onClose: () => {
277 // console.log('close'); 284 // console.log('close');
278 } 285 }
......