zhangbo1_wd

二级栏目页面,添加通用顶部栏

... ... @@ -20,14 +20,15 @@ export class HomeChannelUtils {
* @param channelId 频道id【顶导id】
* @param pageId 目标页面id
*/
jumpChannelTab(channelId: string, pageId: string) {
jumpChannelTab(channelId: string, pageId: string, pageName?: string) {
// 1、首页所有展示频道遍历,找到目标频道
// 2、频道管理里的,非我的频道所有列表遍历,找到目标频道 【这步去掉,和this.bottomNavData重复了】
// 3、一级频道【1、2里找到目标】->【切换底导、切换频道/新增临时频道】
// 4、二级频道【1、2里都没有找到目标】->【跳转栏目页面-ColumnPageComponent】
// 1. 遍历查找目标channel
if (this.bottomNavData == null || this.bottomNavData.bottomNavList == null || this.bottomNavData.bottomNavList.length <= 0) {
if (this.bottomNavData == null || this.bottomNavData.bottomNavList == null ||
this.bottomNavData.bottomNavList.length <= 0) {
this.jumpColumn(channelId, pageId)
return
}
... ... @@ -51,16 +52,17 @@ export class HomeChannelUtils {
}
}
if (StringUtils.isEmpty(bean.bottomNavId)) {
this.jumpColumn(channelId, pageId)
this.jumpColumn(channelId, pageId, pageName)
} else {
this.jumpHomeChannel(bean)
}
}
jumpColumn(channelId: string, pageId: string) {
jumpColumn(channelId: string, pageId: string, pageName?: string) {
let params: AssignChannelParam = new AssignChannelParam()
params.pageId = pageId
params.channelId = channelId
params.pageName = pageName || ''
WDRouterRule.jumpWithPage(WDRouterPage.columnPage, params)
}
... ... @@ -77,6 +79,8 @@ export class AssignChannelParam {
pageId: string = '';
channelId: string = '';
bottomNavId: string = '';
// 跳转专题/二级栏目用到
pageName: string = ''
}
let homeChannelUtils = new HomeChannelUtils();
... ...
... ... @@ -433,8 +433,8 @@ export class ProcessUtils {
*
* @param channelId 频道id【顶导id】
*/
public static jumpChannelTab(channelId: string, pageId: string) {
HomeChannelUtils.jumpChannelTab(channelId, pageId)
public static jumpChannelTab(channelId: string, pageId: string, pageName?: string) {
HomeChannelUtils.jumpChannelTab(channelId, pageId, pageName)
}
/**
... ...
... ... @@ -70,7 +70,7 @@ export struct ZhGridLayout03 {
.width('100%')
.onClick((event: ClickEvent) => {
if (item.objectType === '11') {
ProcessUtils.jumpChannelTab(item.objectId, item.pageId)
ProcessUtils.jumpChannelTab(item.objectId, item.pageId, item.newsTitle)
} else {
ProcessUtils.processPage(item)
}
... ...
... ... @@ -81,7 +81,7 @@ export struct ZhSingleRow02 {
.visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible)
.onClick(() => {
if (this.compDTO?.objectType === '11') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string)
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
} else if (this.compDTO?.objectType === '5') {
ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)
} else if (this.compDTO?.objectType === '6') {
... ...
... ... @@ -39,7 +39,7 @@ export struct ZhSingleRow04 {
.visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible)
.onClick(() => {
if (this.compDTO?.objectType === '11') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string)
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
} else if (this.compDTO?.objectType === '5') {
ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)
} else if (this.compDTO?.objectType === '6') {
... ...