diff --git a/src/components/detail/imageWatch.vue b/src/components/detail/imageWatch.vue index 5699eaa..4579316 100644 --- a/src/components/detail/imageWatch.vue +++ b/src/components/detail/imageWatch.vue @@ -2,7 +2,8 @@
- +
@@ -52,6 +53,7 @@ const props = defineProps({ return [] } }, + index: Number, close: { type: Function }, @@ -67,6 +69,8 @@ let close = props.close let carousel = ref(null) let imageTab = ref(0) + + if(!props['index']) imageTab = props['index'] //上一张 let prev = () => { if (imageTab.value === list.value.length - 1) return diff --git a/src/views/apartmentDetail.vue b/src/views/apartmentDetail.vue index 355d1d6..8d44de1 100644 --- a/src/views/apartmentDetail.vue +++ b/src/views/apartmentDetail.vue @@ -23,14 +23,15 @@
- +
+ :src="item['image'] || item['imageurl']" + @click="cloaseImageShow(allCarouselsData, carouselIndex)">
@@ -142,13 +143,13 @@ src="@/assets/img/publicImage/gray-arrow.svg" alt="">
-
+
-
+
@@ -426,8 +427,13 @@ const { wechat } = toRefs(store.state); let imageShow = ref(false) // 查看大图弹窗的状态 let imageList = ref([]) // 查看大图弹窗的状态 -const cloaseImageShow = (list) => { - if (list) imageList.value = list +let imageIndex = ref(0) // 查看大图弹窗的状态 +const cloaseImageShow = (list, index) => { + if (list) { + console.log("index", index); + imageList.value = list + imageIndex.value = index + } imageShow.value = !imageShow.value } diff --git a/src/views/user.vue b/src/views/user.vue index 9e4b668..ac6d9dc 100644 --- a/src/views/user.vue +++ b/src/views/user.vue @@ -22,7 +22,7 @@
-
+
{{ newmessagenum }}
@@ -109,7 +109,6 @@ -