Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
zhangbo1_wd
2024-01-30 16:25:01 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
dda92c7f02c34861ac20cf3e52bd2ac08070eb16
dda92c7f
1 parent
33c36797
新增页面跳转接口
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
0 deletions
PeopleDaily_Harmony/wdComponent/src/main/ets/constants/ContentConstants.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/repository/bean/ContentDTO.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/utils/ProcessUtils.ets
PeopleDaily_Harmony/wdComponent/src/main/ets/constants/ContentConstants.ets
0 → 100644
View file @
dda92c7
export class ContentConstants {
/* content#objectType,跳转类型:0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14动态图文,15动态视频 */
/**
* 0:不跳转
*/
static readonly TYPE_NONE: string = "0";
/**
* 1:点播
*/
static readonly TYPE_VOD: string = "1";
/**
* 8:图文详情,这里是h5页面
*/
static readonly TYPE_TELETEXT: string = "8";
}
\ No newline at end of file
...
...
PeopleDaily_Harmony/wdComponent/src/main/ets/repository/bean/ContentDTO.ets
View file @
dda92c7
...
...
@@ -34,4 +34,9 @@ export interface ContentDTO {
vImageUrl: string;
screenType: string;
source:string;
objectId:string;
objectType:string;
channelId:string;
relId:string;
relType:string;
}
\ No newline at end of file
...
...
PeopleDaily_Harmony/wdComponent/src/main/ets/utils/ProcessUtils.ets
0 → 100644
View file @
dda92c7
import { Logger } from 'wdKit';
import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
import { ContentConstants } from '../constants/ContentConstants';
import { ContentDTO } from '../repository/bean/ContentDTO';
/**
* 页面跳转业务封装
*/
export class ProcessUtils {
static readonly TAG: string = "ProcessUtils";
/**
* 页面跳转
*/
static processPage(content: ContentDTO) {
if (content == null) {
Logger.error(this.TAG, "processPage, content is null");
return;
}
if (StringUtils.isEmpty(content.objectType)) {
Logger.error(this.TAG, "processPage, objectType is empty");
return;
}
let type = content.objectType;
switch (type) {
case ContentConstants.TYPE_NONE:
Logger.debug(this.TAG, "processPage, do nothing");
break;
case ContentConstants.TYPE_VOD:
Logger.debug(this.TAG, "processPage, nonsupport!!!");
// TODO 待对接更多页面
break;
case ContentConstants.TYPE_TELETEXT:
// 图文详情,跳转h5
this.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(this.TAG, `gotoWeb, ${content.objectId}`);
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment