ProcessUtils.ets
1.41 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
import { Logger } from 'wdKit';
import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
import { ContentConstants } from '../constants/ContentConstants';
import { ContentDTO } from '../repository/bean/ContentDTO';
const TAG = 'ProcessUtils';
/**
* 页面跳转业务封装
*/
export class ProcessUtils {
/**
* 页面跳转
*/
static processPage(content: ContentDTO) {
if (content == null) {
Logger.error(TAG, "processPage, content is null");
return;
}
if (StringUtils.isEmpty(content.objectType)) {
Logger.error(TAG, "processPage, objectType is empty");
return;
}
let type = content.objectType;
switch (type) {
case ContentConstants.TYPE_NONE:
Logger.debug(TAG, "processPage, do nothing");
break;
case ContentConstants.TYPE_VOD:
Logger.debug(TAG, "processPage, nonsupport!!!");
// TODO 待对接更多页面
break;
case ContentConstants.TYPE_TELETEXT:
// 图文详情,跳转h5
ProcessUtils.gotoWeb(content);
break;
default:
break;
}
}
private static gotoWeb(content: ContentDTO) {
// // topicId
// content.channelId;
// content.linkUrl;
// content.objectId;
// // CompId
// content.relId;
// content.relType;
// // ScrollToBottom
// // FromPage
// TODO 对接路由
Logger.debug(TAG, `gotoWeb, ${content.objectId}`);
}
}