Commit 4ae30353 authored by 罗林杰's avatar 罗林杰

修改动态图片显示

parent db441034
......@@ -32,8 +32,14 @@
imgDisplay: 'flex',
}
},
mounted() {
watch: {
imgList: {
handler() {
this.judgeImg();
},
deep: true,
immediate: true
}
},
methods: {
// 预览图片
......
......@@ -46,10 +46,10 @@
</template>
</view>
<view class="contentImg">
<imageAdaptation :imgList="imgs" :imgLayout1="imgLayout1" :imgLayout2="imgLayout2"
<imageAdaptation :imgList="info.url" :imgLayout1="imgLayout1" :imgLayout2="imgLayout2"
:imgLayout3="imgLayout3" @previewImg="preview"></imageAdaptation>
<q-previewImage ref="previewImage" :urls="imgs" @onLongpress="onLongpress" @open="open"
<q-previewImage ref="previewImage" :urls="info.url" @onLongpress="onLongpress" @open="open"
@close="close"></q-previewImage>
</view>
<view class="time">
......@@ -120,17 +120,6 @@
default: () => {}
}
},
watch: {
info: {
handler(newValue) {
if (newValue?.url?.length) {
this.imgs = newValue.url
}
},
deep: true,
immediate: true
}
},
mounted() {
if (this.$refs.uReadMore) {
setTimeout(() => {
......@@ -228,7 +217,7 @@
}) {
uni.previewImage({
current: index,
urls: this.imgs,
urls: this.info.url,
longPressActions: {
// itemList: ['发送给朋友', '保存图片', '收藏'],
success: function(data) {
......
......@@ -183,6 +183,9 @@
//处理动态照片
if (item.pictureId != null){
const urlArray = JSON.parse(item.pictureId)
console.log('urlArray.id:',urlArray.id)
if (urlArray.id.length>0){
console.log('11111111111111')
let arr = []
urlArray.id.forEach(item => {
getOssUrl(item).then(imgRes => {
......@@ -194,6 +197,7 @@
})
item.url = arr
}
}
//处理性别
if (item.memSex != null && item.memSex !== ''){
item.memSex = getValue('sex',item.memSex)
......@@ -213,6 +217,7 @@
}
})
this.$refs.paging.completeByTotal(list,res.data.total);
console.log('22222222',this.dataList)
})
// 组件加载时会自动触发此方法,因此默认页面加载时会自动触发,无需手动调用
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment