陈剑华

feat: 17448 功能缺陷--地方频道下的人民号动态多图无法打开指定位置的图片

... ... @@ -62,20 +62,7 @@ export struct Card19Component {
}
// 图片-从无图到9图展示
createImg({ fullColumnImgUrls: this.contentDTO.fullColumnImgUrls })
.onClick(() => {
const photoList: PhotoListBean[] = this.contentDTO.fullColumnImgUrls.map(item => {
const photo: PhotoListBean = {
width: item.weight,
height: item.height,
picPath: item.fullUrl||item.url,
picDesc: '',
itemType:2,
id:0
}
return photo
})
ProcessUtils.gotoMultiPictureListPage(photoList, 0)
})
CarderInteraction({ contentDTO: this.contentDTO })
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
}
... ... @@ -107,12 +94,12 @@ struct createImg {
@State loadImg: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
if (this.fullColumnImgUrls.length === 4) { // 为了使用栅格布局以便于占用三分之二的宽度,加一个占位
this.fullColumnImgUrls.splice(2, 0, {
fullUrl: ''
} as FullColumnImgUrlDTO)
}
this.loadImg = await onlyWifiLoadImg();
console.log('card19-this.fullColumnImgUrls',JSON.stringify(this.fullColumnImgUrls))
}
... ... @@ -167,14 +154,14 @@ struct createImg {
alignContent: Alignment.BottomEnd
}) {
if (this.getPicType() === 1) {
Image(this.loadImg ? item.fullUrl||item.url : '')
Image(this.loadImg ? item.fullUrl || item.url : '')
.backgroundColor(0xf5f5f5)
.width('100%')
.height(172)
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
} else if (this.getPicType() === 2) {
Image(this.loadImg ? item.fullUrl||item.url : '')
Image(this.loadImg ? item.fullUrl || item.url : '')
.width('100%')
.height(305)
.autoResize(true)
... ... @@ -291,6 +278,20 @@ struct createImg {
.padding({ bottom: 3 })
}
}
.onClick(() => {
const photoList: PhotoListBean[] = this.fullColumnImgUrls.map(item => {
const photo: PhotoListBean = {
width: item.weight,
height: item.height,
picPath: item.fullUrl||item.url,
picDesc: '',
itemType:2,
id:0
}
return photo
})
ProcessUtils.gotoMultiPictureListPage(photoList, index)
})
}
}
})
... ...