wangliang_wd

feat:优化动态详情页图片展示

... ... @@ -1115,9 +1115,8 @@ struct createImg {
getPicHeight(picWidth: number, picHeight: number) {
//console.info(`cj2024 getPicType picWidth = ${picWidth} picHeight = ${picHeight} picWidth / picHeight = ${picWidth / picHeight}`)
if (picWidth && picHeight) {
let imageH = 305
let sizeH = this.compWidth * picHeight / picWidth
return Math.max(sizeH,imageH)
return picWidth/picHeight === 1 ? 228:Math.min(sizeH,305)
} else {
return 305; //普通图
}
... ... @@ -1231,7 +1230,7 @@ struct createImg {
// .aspectRatio(this.onePicW > this.onePicH ? 343 / 198 : 228 / 305)
.width('100%')
.constraintSize({
maxHeight: this.getPicHeight(this.onePicW,this.onePicH)
maxHeight: this.getPicHeight(item.width,item.height)
})
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
... ...