陈剑华

跳转问题

... ... @@ -171,6 +171,17 @@ export class ProcessUtils {
Logger.debug(TAG, `gotoMultiPictureListPage`);
}
public static _gotoSpecialTopic(linkUrl: string) {
let taskAction: Action = {
type: 'JUMP_INNER_NEW_PAGE',
params: {
url: linkUrl,
pageID: 'SPACIAL_TOPIC_PAGE',
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
}
public static gotoSpecialTopic(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_INNER_NEW_PAGE',
... ... @@ -182,6 +193,16 @@ export class ProcessUtils {
WDRouterRule.jumpWithAction(taskAction)
}
public static _gotoDefaultWeb(linkUrl: string) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
url: linkUrl,
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
}
public static gotoDefaultWeb(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
... ...
... ... @@ -34,4 +34,7 @@ export interface CompDTO {
* 组件内容源类型 (LIVE_HORIZONTAL_CARD\LIVE_RESERVATION\LIVE_LARGE_CARD\LIVE_END\LIVE_MONTHLY_RANKING )
*/
dataSourceType: string;
pageId?: string;
objectType?: string;
}
\ No newline at end of file
... ...
... ... @@ -65,7 +65,11 @@ export struct ZhGridLayout03 {
}
.width('100%')
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(item)
if (item.objectType === '11') {
ProcessUtils.jumpChannelTab(item.objectId, item.pageId)
} else {
ProcessUtils.processPage(item)
}
})
}
}
... ...
... ... @@ -36,6 +36,15 @@ export struct ZhSingleRow04 {
.width(14)
.height(14)
}
.onClick(() => {
if (this.compDTO?.objectType === '11') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string)
} else if (this.compDTO?.objectType === '5') {
ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)
} else if (this.compDTO?.objectType === '6') {
ProcessUtils._gotoDefaultWeb(this.compDTO.linkUrl)
}
})
}
.justifyContent(FlexAlign.SpaceBetween)
.margin({ top: 8, bottom: 8 })
... ...
... ... @@ -29,6 +29,17 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
.width(14)
.height(14)
}
.visibility(this.compDTO?.objectType === '0' ? Visibility.None : Visibility.Visible)
.onClick(() => {
if (this.compDTO?.objectType === '11') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string)
} else if (this.compDTO?.objectType === '5') {
ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)
} else if (this.compDTO?.objectType === '6') {
ProcessUtils._gotoDefaultWeb(this.compDTO.linkUrl)
}
})
}.justifyContent(FlexAlign.SpaceBetween)
.padding({ left: 16, right: 16 })
.margin({ top: 8, bottom: 8 })
... ...