diff --git a/pages/canteenRent/rentDetail.vue b/pages/canteenRent/rentDetail.vue
index 3e069d6..6995f63 100644
--- a/pages/canteenRent/rentDetail.vue
+++ b/pages/canteenRent/rentDetail.vue
@@ -4,26 +4,20 @@
-
+
-
+
-
+ >
+
+
-
-
- {{currentImgIndex}}/{{imagesNum}}
+ {{currentShowImgIndex}}/{{imagesNum}}
@@ -184,7 +178,8 @@
const rentId = ref('');
const detailRent = ref('')
const imagesNum = ref(0);
- const currentImgIndex = ref(1)
+ const currentImgIndex = ref(0)
+ const currentShowImgIndex = ref(1)
const showContacted = ref(false)
const showContactNo = ref(false)
onLoad((options) => {
@@ -200,7 +195,8 @@
getDetail();
}
})
-
+
+ const imageList = ref([])
async function getDetail() {
const res = await sheep.$api.rent.rentInfo(rentId.value)
console.log('获取招租详情', res);
@@ -208,9 +204,9 @@
detailRent.value = res.data.detail
detailRent.value.release_time_text = detailRent.value.release_time_text.substring(0, 10);
- const imageList = res.data.detail.images
- console.log('imageList:', imageList.length);
- imagesNum.value = imageList.length
+ imageList.value = res.data.detail.images
+ console.log('imageList:', imageList.value);
+ imagesNum.value = imageList.value.length
console.log('imagesNum:', imagesNum.value);
} else {
uni.showToast({
@@ -219,6 +215,28 @@
})
}
}
+
+ function swiperChange(e) {
+ console.log('切换轮播图',e.detail.current);
+ if(e.detail.current
+ @animationfinish="swiperChange">
-
+