陈剑华

feat: 20527 【折叠屏】搜索 点击庆祝人民政协成立七十五周年,图片截断了

... ... @@ -34,7 +34,7 @@ export struct Card19Component {
}
titleInit() {
const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.title);
const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.title || this.contentDTO.newsTitle);
this.titleMarked = titleInitRes.titleMarked;
this.textArr = titleInitRes.textArr;
}
... ... @@ -52,8 +52,9 @@ export struct Card19Component {
pageName: this.pageName,
isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg
}
) // 标题
if (this.contentDTO.newsTitle) {
)
// 标题
if (this.contentDTO.title || this.contentDTO.newsTitle ) {
Text() {
if (this.titleMarked) {
ForEach(this.textArr, (textItem: textItem) => {
... ... @@ -292,9 +293,7 @@ struct createImg {
.backgroundColor(0xf5f5f5)
// .aspectRatio(this.onePicW > this.onePicH ? 343 / 198 : 228 / 305)
.width('100%')
.constraintSize({
maxHeight: this.onePicW > this.onePicH ? 198 : 305
})
.aspectRatio(this.onePicW / this.onePicH < 1.5 ? 343 / 198 : 343 / 305)
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
.borderStyle(BorderStyle.Solid)
... ...