AdvCardParser.ets
1.87 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
import { CompStyle } from 'wdConstant';
import { CompDTO } from 'wdBean';
import { CardAdvThreeImageComponent } from './CardAdvThreeImageComponent';
import { CardAdvSmallImageComponent } from './CardAdvSmallImageComponent';
import { CardAdvLongImageComponent } from './CardAdvLongImageComponent';
import { CardAdvBigImageComponent } from './CardAdvBigImageComponent';
import { CardAdvVideoComponent } from './CardAdvVideoComponent';
import { CardAdvGanMiComponent } from './CardAdvGanMiComponent';
import { CardAdvVideoExComponent } from './CardAdvVideoExComponent';
/**
* @Description: 广告稿件解析类
* @Author:
* @Email: liyubing@wondertek.com.cn
* @CreateDate:
* @UpdateRemark: 更新说明
* @Version: 1.0
*/
@Component
export struct AdvCardParser {
@State compDTO: CompDTO = {} as CompDTO;
build() {
this.contentBuilder(this.compDTO);
}
@Builder
contentBuilder(compDTO: CompDTO) {
if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_5) { //三图广告
CardAdvThreeImageComponent({ compDTO })
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_6) { //小图广告
CardAdvSmallImageComponent({ compDTO })
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_7 ||
compDTO.matInfo.advSubType === CompStyle.Card_Adv_12) { // 长通栏广告 和 顶部长通栏广告
CardAdvLongImageComponent({ compDTO })
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_8) { //大图广告
CardAdvBigImageComponent({ compDTO })
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_9) { //视频广告
CardAdvVideoComponent({ compDTO })
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_10) { //展会广告
CardAdvVideoExComponent({ compDTO })
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_11) { //冠名广告
CardAdvGanMiComponent({ compDTO })
}
}
}