xingzhaojie

通用轮播卡 Zh_Carousel_Layout_01类型修改,标题取值修改

... ... @@ -32,7 +32,7 @@ export struct CompParser {
TitleAbbrComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === '3') {
TitleAllComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === CompStyle.Carousel_Layout_01) {
} else if (compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
BannerComponent({ compDTO: compDTO })
} else if (compDTO.compStyle === "2") {
BigPicCardComponent({ compDTO: compDTO })
... ...
... ... @@ -55,10 +55,21 @@ export struct BannerComponent {
Image(item.coverUrl)
.objectFit(ImageFit.Fill)
.borderRadius(5)
.onClick(()=>{
AlertDialog.show({
title: '🥟id : ' + item.objectId,
message: '标题:' + item.newsTitle,
confirm: {
value: "OK",
action: () => {
},
}
})
})
// 底部标题和时间
Column() {
Text(item.description)
Text(item.newsTitle)
.fontSize(18)
.margin({ bottom: 4 })
.fontColor(Color.White)
... ... @@ -113,7 +124,7 @@ export struct BannerComponent {
// 底部标题和时间
Row() {
// 标题
Text(this.bannerContent.description.toString())
Text(this.bannerContent.newsTitle.toString())
.fontSize(18)
.fontColor(Color.White)
.fontWeight(600)
... ...
... ... @@ -3,7 +3,7 @@
*/
export const enum CompStyle {
Label_03 = 'Label-03', // 标题卡:icon+文字
Carousel_Layout_01 = 'Carousel_Layout-01', // 通用轮播卡:视频、直播、活动、专题、榜单、外链
Zh_Carousel_Layout_01 = 'Zh_Carousel_Layout-01', // 通用轮播卡:视频、直播、活动、专题、榜单、外链
Carousel_Layout_02 = 'Carousel_Layout-02', // 直播轮播卡:直播
Single_Row_01 = 'Single_Row-01', // 三格方形小卡(排名):专题、活动
Single_Row_02 = 'Single_Row-02', // 通用横划卡:视频、直播、专题
... ...