CompDTO.ets
3.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
import { CompAdvMatInfoBean } from '../adv/CompAdvInfoBean';
import { AudioDTO } from '../content/AudioDTO';
import { ContentDTO } from '../content/ContentDTO';
import { BaseDTO } from './BaseDTO';
@Observed
export class CompDTO implements BaseDTO {
expIds: string = '';
itemId: string = '';
contentText?: string = '';
backgroundColor: string = '';
backgroundImgUrl: string = '';
cityCode: string = '';
compStyle: string = '';
compType: string = '';
cardItemId: string = '';
// dataSourceRequest: any[];
districtCode: string = '';
extraData?: string;
hasAdInfo: number = -1;
id: number = 0;
imgSize: string = '';
innerUrl: string = '';
linkUrl: string = '';
// meddleDataList: any[];
name: string = '';
objectId: string = ''; // 跳转页面id?
/**
* 频道(1:一级频道,2:二级频道),专题(21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题,26:时间轴专题)
*/
objectLevel:string = ''
objectTitle: string = ''; // comp标题
objectSummary: string = ''; // 跳转频道、专题摘要【BFF聚合】
// objectType?: string; // 跳转类型,枚举:
operDataList: ContentDTO[] = []; // 运营数据列表【正常运营配置的强运营数据,部分推荐场景的配置(自动源兜底数据)】
// pageId?: any;
posterSize: string = '';
posterUrl: string = '';
provinceCode: string = '';
sortValue: number = -1;
subType: string = '';
imageScale: number = -1; // 封面图比例 1-4:3, 2-16:9, 3-3:2
audioDataList: AudioDTO[] = [];
titleShowPolicy: string | number = '';
titleShow: string | number = '';
/**
* 组件内容源类型 (LIVE_HORIZONTAL_CARD\LIVE_RESERVATION\LIVE_LARGE_CARD\LIVE_END\LIVE_MONTHLY_RANKING )
*/
dataSourceType: string = '';
/**
* 信息流广告素材
*/
matInfo: CompAdvMatInfoBean = new CompAdvMatInfoBean
pageId?: string;
objectType?: string;
hasMore: number = 1;
// keyGenerator相关字符串,用于刷新list布局
timestamp: String = '1'
bottomNavId:string = ''
//数据来源接口 0:非推荐楼层接口;1:推荐楼层接口
sourceInterfaceVal: number = 0
appStyle: string = '';
/**
* 是否推荐数据;默认0:否,1:是
*/
recommend:number = 0
relId: string = '';
relType: string = '';
itemType: string = '';
sceneId: string = '';
traceId: string = '';
traceInfo: string = '';
// 是否是我的收藏 编辑状态
isCollectionEditting:boolean = false;
isSelect: boolean = false;
/**
* 创建新的compbean对象
* @param old
* @returns
*/
static createNewsBean(old: CompDTO): CompDTO {
let comp: CompDTO = new CompDTO
comp.compStyle = old.compStyle
comp.compType = old.compType
comp.operDataList = old.operDataList
comp.extraData = old.extraData
comp.matInfo = old.matInfo
comp.backgroundColor = old.backgroundColor
comp.backgroundImgUrl = old.backgroundImgUrl
comp.cityCode = old.cityCode
comp.districtCode = old.districtCode
comp.provinceCode = old.provinceCode
comp.hasAdInfo = old.hasAdInfo
comp.id = old.id
comp.imgSize = old.imgSize
comp.innerUrl = old.innerUrl
comp.linkUrl = old.linkUrl
comp.name = old.name
comp.objectId = old.objectId
comp.objectTitle = old.objectTitle
comp.posterSize = old.posterSize
comp.posterUrl = old.posterUrl
comp.sortValue = old.sortValue
comp.subType = old.subType
comp.imageScale = old.imageScale
comp.audioDataList = old.audioDataList
comp.titleShowPolicy = old.titleShowPolicy
comp.titleShow = old.titleShow
comp.pageId = old.pageId
comp.extraData = old.extraData
comp.dataSourceType = old.dataSourceType
comp.objectType = old.objectType
comp.hasMore = old.hasMore
return comp
}
}