修改图片预览

This commit is contained in:
A1300399510
2023-07-27 15:41:30 +08:00
parent bee5f42a99
commit a20164b8fe
3 changed files with 43 additions and 33 deletions

View File

@@ -19,7 +19,6 @@
<el-carousel :autoplay="false" arrow="never" indicator-position="none" ref="remarkCaruselUp"
@change="carouselChange">
<el-carousel-item class="flexcenter" v-for="(item, index) in allCarouselsData">
<img v-if="index >= carouselIndex - 1 && index <= carouselIndex + 1" class="img"
:src="item['image'] || item['imageurl']" @click="cloaseImageShow(allCarouselsData)">
</el-carousel-item>
@@ -446,6 +445,16 @@ const init = () => {
proxy.$get("/tenement/pc/api/apartment/details", { uniqid }).then(res => {
if (res.code != 200) return
let data = res.data
data['roomList'].forEach(element => {
element['images'].forEach(element => {
element['type'] = 'attachment'
})
element['videos'].forEach(element => {
element['type'] = 'videos'
})
})
roomList.value = data['roomList']
data['info']['coordinate'] = data['info']['coordinate'].split(',').map(item => {
return +item
@@ -679,8 +688,6 @@ const handleScroll = () => {
}
const indicateTypeState = () => {
console.log("carouselsconfig", carouselsconfig);
let total = 0 // 累计
for (const key in carouselsconfig.value) {
if (carouselsconfig.value[key]['amount'] > 0) total++

View File

@@ -1106,21 +1106,25 @@ let housingInfo = reactive({})
let concatInfo = reactive({})
let setHousingArr = () => {
let arr = []
arr = housingInfo['data'].info.video ? arr.concat(housingInfo['data'] && housingInfo['data'].info.video) : []
arr = housingInfo['data'].info.picturegroup ? arr.concat(housingInfo['data'] && housingInfo['data'].info.picturegroup) : []
imgList.value = imgList.value.concat(arr)
// let arr = []
// arr = housingInfo['data'].info.video ? arr.concat(housingInfo['data'] && housingInfo['data'].info.video) : []
// arr = housingInfo['data'].info.picturegroup ? arr.concat(housingInfo['data'] && housingInfo['data'].info.picturegroup) : []
// imgList.value = imgList.value.concat(arr)
console.log(imgList.value)
if (housingInfo['data'].info.video) {
housingInfo['data'].info.video.forEach(element => {
element['type'] = 'videos'
})
housingInfo['data'].info.video.forEach(element => {
console.log("element", element);
element['type'] = 'videos'
})
imgList.value = [...housingInfo['data'].info.video]
}
if (housingInfo['data'].info.picturegroup) {
housingInfo['data'].info.picturegroup.forEach(element => {
element['type'] = 'attachment'
})
imgList.value = [...housingInfo['data'].info.picturegroup]
}
// lives
console.log("housingInfo['data'].info.video", housingInfo['data'].info.video);
}
@@ -2644,7 +2648,6 @@ img {
}
.school-info {
height: 500px;
overflow-y: scroll;
font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC', sans-serif;
@@ -2794,5 +2797,6 @@ img {
}
}
}
}</style>
}
</style>