zhangbo1_wd

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

@@ -20,14 +20,15 @@ export class HomeChannelUtils { @@ -20,14 +20,15 @@ export class HomeChannelUtils {
20 * @param channelId 频道id【顶导id】 20 * @param channelId 频道id【顶导id】
21 * @param pageId 目标页面id 21 * @param pageId 目标页面id
22 */ 22 */
23 - jumpChannelTab(channelId: string, pageId: string) { 23 + jumpChannelTab(channelId: string, pageId: string, pageName?: string) {
24 // 1、首页所有展示频道遍历,找到目标频道 24 // 1、首页所有展示频道遍历,找到目标频道
25 // 2、频道管理里的,非我的频道所有列表遍历,找到目标频道 【这步去掉,和this.bottomNavData重复了】 25 // 2、频道管理里的,非我的频道所有列表遍历,找到目标频道 【这步去掉,和this.bottomNavData重复了】
26 // 3、一级频道【1、2里找到目标】->【切换底导、切换频道/新增临时频道】 26 // 3、一级频道【1、2里找到目标】->【切换底导、切换频道/新增临时频道】
27 // 4、二级频道【1、2里都没有找到目标】->【跳转栏目页面-ColumnPageComponent】 27 // 4、二级频道【1、2里都没有找到目标】->【跳转栏目页面-ColumnPageComponent】
28 28
29 // 1. 遍历查找目标channel 29 // 1. 遍历查找目标channel
30 - if (this.bottomNavData == null || this.bottomNavData.bottomNavList == null || this.bottomNavData.bottomNavList.length <= 0) { 30 + if (this.bottomNavData == null || this.bottomNavData.bottomNavList == null ||
  31 + this.bottomNavData.bottomNavList.length <= 0) {
31 this.jumpColumn(channelId, pageId) 32 this.jumpColumn(channelId, pageId)
32 return 33 return
33 } 34 }
@@ -51,16 +52,17 @@ export class HomeChannelUtils { @@ -51,16 +52,17 @@ export class HomeChannelUtils {
51 } 52 }
52 } 53 }
53 if (StringUtils.isEmpty(bean.bottomNavId)) { 54 if (StringUtils.isEmpty(bean.bottomNavId)) {
54 - this.jumpColumn(channelId, pageId) 55 + this.jumpColumn(channelId, pageId, pageName)
55 } else { 56 } else {
56 this.jumpHomeChannel(bean) 57 this.jumpHomeChannel(bean)
57 } 58 }
58 } 59 }
59 60
60 - jumpColumn(channelId: string, pageId: string) { 61 + jumpColumn(channelId: string, pageId: string, pageName?: string) {
61 let params: AssignChannelParam = new AssignChannelParam() 62 let params: AssignChannelParam = new AssignChannelParam()
62 params.pageId = pageId 63 params.pageId = pageId
63 params.channelId = channelId 64 params.channelId = channelId
  65 + params.pageName = pageName || ''
64 WDRouterRule.jumpWithPage(WDRouterPage.columnPage, params) 66 WDRouterRule.jumpWithPage(WDRouterPage.columnPage, params)
65 } 67 }
66 68
@@ -77,6 +79,8 @@ export class AssignChannelParam { @@ -77,6 +79,8 @@ export class AssignChannelParam {
77 pageId: string = ''; 79 pageId: string = '';
78 channelId: string = ''; 80 channelId: string = '';
79 bottomNavId: string = ''; 81 bottomNavId: string = '';
  82 + // 跳转专题/二级栏目用到
  83 + pageName: string = ''
80 } 84 }
81 85
82 let homeChannelUtils = new HomeChannelUtils(); 86 let homeChannelUtils = new HomeChannelUtils();
@@ -433,8 +433,8 @@ export class ProcessUtils { @@ -433,8 +433,8 @@ export class ProcessUtils {
433 * 433 *
434 * @param channelId 频道id【顶导id】 434 * @param channelId 频道id【顶导id】
435 */ 435 */
436 - public static jumpChannelTab(channelId: string, pageId: string) {  
437 - HomeChannelUtils.jumpChannelTab(channelId, pageId) 436 + public static jumpChannelTab(channelId: string, pageId: string, pageName?: string) {
  437 + HomeChannelUtils.jumpChannelTab(channelId, pageId, pageName)
438 } 438 }
439 439
440 /** 440 /**
@@ -70,7 +70,7 @@ export struct ZhGridLayout03 { @@ -70,7 +70,7 @@ export struct ZhGridLayout03 {
70 .width('100%') 70 .width('100%')
71 .onClick((event: ClickEvent) => { 71 .onClick((event: ClickEvent) => {
72 if (item.objectType === '11') { 72 if (item.objectType === '11') {
73 - ProcessUtils.jumpChannelTab(item.objectId, item.pageId) 73 + ProcessUtils.jumpChannelTab(item.objectId, item.pageId, item.newsTitle)
74 } else { 74 } else {
75 ProcessUtils.processPage(item) 75 ProcessUtils.processPage(item)
76 } 76 }
@@ -81,7 +81,7 @@ export struct ZhSingleRow02 { @@ -81,7 +81,7 @@ export struct ZhSingleRow02 {
81 .visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible) 81 .visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible)
82 .onClick(() => { 82 .onClick(() => {
83 if (this.compDTO?.objectType === '11') { 83 if (this.compDTO?.objectType === '11') {
84 - ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string) 84 + ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
85 } else if (this.compDTO?.objectType === '5') { 85 } else if (this.compDTO?.objectType === '5') {
86 ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl) 86 ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)
87 } else if (this.compDTO?.objectType === '6') { 87 } else if (this.compDTO?.objectType === '6') {
@@ -39,7 +39,7 @@ export struct ZhSingleRow04 { @@ -39,7 +39,7 @@ export struct ZhSingleRow04 {
39 .visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible) 39 .visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible)
40 .onClick(() => { 40 .onClick(() => {
41 if (this.compDTO?.objectType === '11') { 41 if (this.compDTO?.objectType === '11') {
42 - ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string) 42 + ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
43 } else if (this.compDTO?.objectType === '5') { 43 } else if (this.compDTO?.objectType === '5') {
44 ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl) 44 ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)
45 } else if (this.compDTO?.objectType === '6') { 45 } else if (this.compDTO?.objectType === '6') {