douaojie

fix: 头图卡标题不显示

... ... @@ -7,6 +7,7 @@ export interface CompDTO {
cityCode: string;
compStyle: string;
compType: string;
// dataSourceRequest: any[];
districtCode: string;
extraData?: string;
... ... @@ -15,6 +16,7 @@ export interface CompDTO {
imgSize: string;
innerUrl: string;
linkUrl: string;
// meddleDataList: any[];
name: string;
objectId: string; // 跳转页面id?
... ... @@ -29,6 +31,7 @@ export interface CompDTO {
subType: string;
imageScale: number; // 封面图比例 1-4:3, 2-16:9, 3-3:2
audioDataList: AudioDTO[];
titleShowPolicy: string | number;
/**
* 组件内容源类型 (LIVE_HORIZONTAL_CARD\LIVE_RESERVATION\LIVE_LARGE_CARD\LIVE_END\LIVE_MONTHLY_RANKING )
... ...
... ... @@ -20,8 +20,8 @@ import { ZhCarouselLayout01 } from './compview/ZhCarouselLayout01';
import { CardParser } from './CardParser';
import { LiveHorizontalReservationComponent } from './view/LiveHorizontalReservationComponent';
import { ZhGridLayout02 } from './compview/ZhGridLayout02';
import { Card5Component } from './cardview/Card5Component';
import { Card2Component } from './cardview/Card2Component';
import { Card5Component } from './cardview/Card5Component';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
/**
... ... @@ -71,7 +71,7 @@ export struct CompParser {
ZhSingleRow06({ compDTO })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
//头图卡 和comStyle 2相同,
Card5Component({ contentDTO: compDTO.operDataList[0] })
Card5Component({ contentDTO: compDTO.operDataList[0], titleShowPolicy: compDTO.titleShowPolicy })
} else if (compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
// 大图卡
Card2Component({ contentDTO: compDTO.operDataList[0] })
... ...
... ... @@ -20,6 +20,7 @@ export struct Card5Component {
// newsTitle: '今天是周日,天气阴天,明天是周一。',
// objectType: '6'
} as ContentDTO;
@State titleShowPolicy: number | string = 1
build() {
Stack() {
... ... @@ -27,7 +28,7 @@ export struct Card5Component {
.width(CommonConstants.FULL_WIDTH)
.autoResize(true)
.borderRadius($r('app.float.image_border_radius'))
if (this.contentDTO.titleShow === 1 && this.contentDTO.newsTitle) {
if (this.titleShowPolicy === 1 && this.contentDTO.newsTitle) {
Row()
.width(CommonConstants.FULL_WIDTH)
.height(59)
... ...