ContentDTO.ets
6.61 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO';
import { LiveInfoDTO } from '../detail/LiveInfoDTO';
import { VideoInfoDTO } from '../detail/VideoInfoDTO';
import { InteractDataDTO } from './InteractDataDTO';
import { slideShows } from '../morningevening/slideShows';
import { VoiceInfoDTO } from '../detail/VoiceInfoDTO';
import { RmhInfoDTO } from '../detail/RmhInfoDTO';
import { commentInfo } from './commentInfo';
import { BaseDTO } from '../component/BaseDTO';
import { LiveRoomDataBean } from '../live/LiveRoomDataBean';
export class ContentShareInfoDTO {
shareTitle: string = ''
shareUrl: string = ''
shareSummary: string = ''
shareCoverUrl: string = ''
sharePosterCoverUrl: string = ''
shareOpen: number = 0
sharePosterOpen: number = 0
}
@Observed
export class ContentDTO implements BaseDTO {
seoTags: string = '';
cornerMark:string = '';
liveType?: string; // 直播新闻-直播状态
expIds: string = '';
itemId: string = '';
shareFlag?: string = '1';
appStyle: string = '';
cityCode: string = '';
coverSize: string = '';
coverType: number = -1;
coverUrl: string = '';
cnsTraceId: string = ''
description: string = '';
districtCode: string = '';
endTime: string = '';
hImageUrl: string = '';
heatValue: string = '';
innerUrl: string = '';
landscape: number = -1;
lengthTime?: object;
linkUrl: string = '';
openLikes: number = 0;
openComment?: number;
openUrl: string = '';
pageId: string = '';
// playUrls: any[];
programAuth: string = '';
programId: string = '';
programName: string = '';
programSource: number = -1;
programType: number = -1;
provinceCode: string = '';
// rankingList: any[];
showTitleEd: string = '';
showTitleIng: string = '';
showTitleNo: string = '';
// sortValue?: any;
startTime: string = '';
subType: string = '';
subtitle: string = '';
sceneId: string = '';
subSceneId: string = '';
title: string = '';
vImageUrl: string = '';
screenType: string = '';
source: string = '';
objectId: string = '';
objectType: string = '';
objectLevel: string = '';
channelId: string = '';
relId: string = '';
relType: string = '';
newsTitle: string = ''; //单图卡/2行标题/3行标题
publishTime: string = '';
publishTimestamp: string = '';
visitorComment: number = 0;
fullColumnImgUrls: FullColumnImgUrlDTO[] = [];
liveInfo: LiveInfoDTO = {} as LiveInfoDTO; // 直播新闻信息【BFF聚合】
videoInfo: VideoInfoDTO = {} as VideoInfoDTO; // 视频新闻信息【BFF聚合】,视频非原片+清晰度最高的
shareInfo: ContentShareInfoDTO = {} as ContentShareInfoDTO
newsSummary: string = ''; //appstyle:2 ,新闻详情
contentText?: string = '';
// 二次请求接口,返回的数据,这里组装到content里;
interactData?: InteractDataDTO;
hasMore: number = -1;
slideShows: slideShows[] = [];
voiceInfo: VoiceInfoDTO = {} as VoiceInfoDTO;
tagWord: number = -1;
isSelect: boolean = false;
rmhInfo: RmhInfoDTO = {} as RmhInfoDTO; // 人民号信息
photoNum: number = 0;
corner: string = '';
rmhPlatform: number = 0;
newTags: string = '';
titleShow?: number;
isSearch?: boolean; // 是否是搜索的结果,区分搜索和主页的数据
isCollection?: boolean; // 是否是收藏的结果,区分搜索和主页的数据
commentInfo?: commentInfo
//底部导航栏 id(用于频道跳转)
bottomNavId: string = '';
// 链接类型: 0:无链接;1:内链(文章);2:外链
openType: string = '';
extra: string = ''
sameContentList:ContentDTO[] = []
sameContentListJson:string = ""
sameContentListSize:number = 0
/*
本地辅助字段
*/
liveRoomDataBean : LiveRoomDataBean = {} as LiveRoomDataBean// 批查获取到的直播观看人数
//本地字段:时间轴专题页节点组件时间;【如果开启模糊则显示时间->左右;0:否,1:是】
timeBlurred:number = 0
top:number = 0
static clone(old: ContentDTO): ContentDTO {
let content = new ContentDTO();
content.liveType = old.liveType;
content.seoTags = old.seoTags;
content.appStyle = old.appStyle;
content.cityCode = old.cityCode;
content.coverSize = old.coverSize;
content.coverType = old.coverType;
content.coverUrl = old.coverUrl;
content.description = old.description;
content.districtCode = old.districtCode;
content.endTime = old.endTime;
content.hImageUrl = old.hImageUrl;
content.heatValue = old.heatValue;
content.innerUrl = old.innerUrl;
content.landscape = old.landscape;
content.lengthTime = old.lengthTime;
content.linkUrl = old.linkUrl;
content.openLikes = old.openLikes;
content.openComment = old.openComment;
content.openUrl = old.openUrl;
content.pageId = old.pageId;
content.programAuth = old.programAuth;
content.programId = old.programId;
content.programName = old.programName;
content.programSource = old.programSource;
content.programType = old.programType;
content.provinceCode = old.provinceCode;
content.showTitleEd = old.showTitleEd;
content.showTitleIng = old.showTitleIng;
content.showTitleNo = old.showTitleNo;
content.startTime = old.startTime;
content.subType = old.subType;
content.subtitle = old.subtitle;
content.title = old.title;
content.vImageUrl = old.vImageUrl;
content.source = old.source;
content.objectId = old.objectId;
content.objectType = old.objectType;
content.channelId = old.channelId;
content.relId = old.relId;
content.relType = old.relType;
content.newsTitle = old.newsTitle;
content.publishTime = old.publishTime;
content.publishTimestamp = old.publishTimestamp;
content.visitorComment = old.visitorComment;
content.fullColumnImgUrls = old.fullColumnImgUrls;
content.liveInfo = old.liveInfo;
content.videoInfo = old.videoInfo;
content.shareInfo = old.shareInfo
content.newsSummary = old.newsSummary;
content.interactData = old.interactData;
content.hasMore = old.hasMore;
content.slideShows = old.slideShows;
content.voiceInfo = old.voiceInfo;
content.tagWord = old.tagWord;
content.isSelect = old.isSelect;
content.rmhInfo = old.rmhInfo;
content.photoNum = old.photoNum;
content.corner = old.corner;
content.cornerMark = old.cornerMark;
content.rmhPlatform = old.rmhPlatform;
content.newTags = old.newTags;
content.titleShow = old.titleShow;
content.isSearch = old.isSearch;
content.isCollection = old.isCollection;
content.commentInfo = old.commentInfo;
content.bottomNavId = old.bottomNavId;
content.openType = old.openType;
content.extra = old.extra;
return content;
}
}