liyubing

feat(信息流):处理二次请求批查获取的数据 响应稿件页面

@@ -10,73 +10,74 @@ @@ -10,73 +10,74 @@
10 /* 10 /*
11 信息流广告素材解析累 11 信息流广告素材解析累
12 */ 12 */
13 -export interface CompAdvMatInfoBean { 13 +export class CompAdvMatInfoBean {
14 14
  15 + id:number = 0
15 /** 16 /**
16 * 广告标题 17 * 广告标题
17 */ 18 */
18 - advTitle: string 19 + advTitle: string = ''
19 /** 20 /**
20 * 3:信息流广告 21 * 3:信息流广告
21 */ 22 */
22 - advType: string 23 + advType: string =''
23 /** 24 /**
24 * 信息流广告类型(4:轮播图 5:三图广告 6:小图广告 7:长通栏广告 8:大图广告 9:视频广告 10:展会广告 11:冠名广告 12:顶部长通栏广告) 25 * 信息流广告类型(4:轮播图 5:三图广告 6:小图广告 7:长通栏广告 8:大图广告 9:视频广告 10:展会广告 11:冠名广告 12:顶部长通栏广告)
25 */ 26 */
26 - advSubType: number 27 + advSubType: number = 0
27 /** 28 /**
28 * 素材图片信息;adv_subtype=4,5,6,7,8,9,12 时使用 29 * 素材图片信息;adv_subtype=4,5,6,7,8,9,12 时使用
29 */ 30 */
30 - matImageUrl: string[] 31 + matImageUrl: string[] = []
31 /** 32 /**
32 * 视频广告地址(adv_subtype=9) 33 * 视频广告地址(adv_subtype=9)
33 */ 34 */
34 - matVideoUrl: string 35 + matVideoUrl: string = ''
35 /** 36 /**
36 * 扩展信息:advSubType=10,11时使用,字段示例见接口备注。 37 * 扩展信息:advSubType=10,11时使用,字段示例见接口备注。
37 */ 38 */
38 - extraData: string 39 + extraData: string = ''
39 /** 40 /**
40 * 链接类型: 0:无链接;1:内链(文章);2:外链 41 * 链接类型: 0:无链接;1:内链(文章);2:外链
41 */ 42 */
42 - linkType: string 43 + linkType: string = ''
43 /** 44 /**
44 * 链接跳转类型 :0-没链接,不用打开,1-端内打开,2-端外打开 45 * 链接跳转类型 :0-没链接,不用打开,1-端内打开,2-端外打开
45 */ 46 */
46 - openType: string 47 + openType: string = ''
47 /** 48 /**
48 * 广告跳转链接 49 * 广告跳转链接
49 */ 50 */
50 - linkUrl: string 51 + linkUrl: string = ''
51 /** 52 /**
52 * 素材类型(0:图片 1:视频) 53 * 素材类型(0:图片 1:视频)
53 */ 54 */
54 - matType: string 55 + matType: string = ''
55 /** 56 /**
56 * 开屏样式(1:全屏样式 0:底部固定Logo) 57 * 开屏样式(1:全屏样式 0:底部固定Logo)
57 */ 58 */
58 - startStyle: string 59 + startStyle: string = ''
59 } 60 }
60 61
61 /** 62 /**
62 * 信息流广告位 63 * 信息流广告位
63 */ 64 */
64 -export interface CompAdvSlotInfoBean { 65 +export class CompAdvSlotInfoBean {
65 66
66 67
67 /** 68 /**
68 * 组件id 69 * 组件id
69 */ 70 */
70 - compId: string; 71 + compId: string = '';
71 72
72 /** 73 /**
73 * 广告位位置 从1开始 74 * 广告位位置 从1开始
74 */ 75 */
75 - position: number; 76 + position: number = 0;
76 77
77 /** 78 /**
78 * 频道id 79 * 频道id
79 */ 80 */
80 - channelId: string; 81 + channelId: string = '';
81 82
82 } 83 }
@@ -40,7 +40,7 @@ export class CompDTO implements BaseDTO { @@ -40,7 +40,7 @@ export class CompDTO implements BaseDTO {
40 /** 40 /**
41 * 信息流广告素材 41 * 信息流广告素材
42 */ 42 */
43 - matInfo: CompAdvMatInfoBean = {} as CompAdvMatInfoBean 43 + matInfo: CompAdvMatInfoBean = new CompAdvMatInfoBean
44 pageId?: string; 44 pageId?: string;
45 objectType?: string; 45 objectType?: string;
46 hasMore: number = 1 46 hasMore: number = 1
@@ -54,7 +54,7 @@ export struct CardAdvBottom { @@ -54,7 +54,7 @@ export struct CardAdvBottom {
54 let currentIndex = -1 54 let currentIndex = -1
55 for (let i = 0; i < this.pageModel.compList.size(); i++) { 55 for (let i = 0; i < this.pageModel.compList.size(); i++) {
56 let b = this.pageModel.compList.getData(i) as CompDTO 56 let b = this.pageModel.compList.getData(i) as CompDTO
57 - if (a.compStyle === b.compStyle && a.matInfo === b.matInfo) { 57 + if (a.compStyle == b.compStyle && a.matInfo.id == b.matInfo.id) {
58 currentIndex = i 58 currentIndex = i
59 break; 59 break;
60 } 60 }
@@ -272,10 +272,11 @@ export class PageHelper { @@ -272,10 +272,11 @@ export class PageHelper {
272 let b = advPosition - a; 272 let b = advPosition - a;
273 // console.error('ZZZXXXXX', matInfo.advSubType + '-------------' + matInfo.advTitle + " " + advPosition + " " + a + " " + b) 273 // console.error('ZZZXXXXX', matInfo.advSubType + '-------------' + matInfo.advTitle + " " + advPosition + " " + a + " " + b)
274 if (b <= pageCompSize && b >= 0) { 274 if (b <= pageCompSize && b >= 0) {
275 - 275 + // 创建广告稿件
276 let advComp: CompDTO = new CompDTO; 276 let advComp: CompDTO = new CompDTO;
277 advComp.compStyle = CompStyle.Card_Comp_Adv 277 advComp.compStyle = CompStyle.Card_Comp_Adv
278 advComp.matInfo = matInfo 278 advComp.matInfo = matInfo
  279 +
279 if (pageCompSize == slotInfo.position) { 280 if (pageCompSize == slotInfo.position) {
280 pageCompList.add(advComp) 281 pageCompList.add(advComp)
281 } else { 282 } else {