yangchenggong1_wd

fix |> 20791 人民号>推荐频道,地方精选卡不应展示更多按钮,见对比截图。

@@ -8,4 +8,5 @@ export const enum BottomNavi { @@ -8,4 +8,5 @@ export const enum BottomNavi {
8 VIDEO=2, 8 VIDEO=2,
9 SERVICE=3, 9 SERVICE=3,
10 MINE=4, 10 MINE=4,
  11 + TEMPLATE=5,
11 } 12 }
1 import { CompDTO, ContentDTO } from 'wdBean'; 1 import { CompDTO, ContentDTO } from 'wdBean';
2 -import { CommonConstants, CompStyle } from 'wdConstant/Index'; 2 +import { BottomNavi, CommonConstants, CompStyle } from 'wdConstant/Index';
3 import PageModel from '../viewmodel/PageModel'; 3 import PageModel from '../viewmodel/PageModel';
4 import { CardParser } from './CardParser'; 4 import { CardParser } from './CardParser';
5 import { Card2Component } from './cardview/Card2Component'; 5 import { Card2Component } from './cardview/Card2Component';
@@ -42,6 +42,7 @@ export struct CompParser { @@ -42,6 +42,7 @@ export struct CompParser {
42 @State private pageModel: PageModel = new PageModel(); 42 @State private pageModel: PageModel = new PageModel();
43 @State audioItems: ContentDTO[] = []; 43 @State audioItems: ContentDTO[] = [];
44 @State noneAudioItems: ContentDTO[] = []; 44 @State noneAudioItems: ContentDTO[] = [];
  45 + bottomNavi:BottomNavi = BottomNavi.PEOPLE
45 46
46 aboutToAppear(): void { 47 aboutToAppear(): void {
47 48
@@ -167,7 +168,7 @@ export struct CompParser { @@ -167,7 +168,7 @@ export struct CompParser {
167 ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg }) 168 ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
168 this.getBehindDivider() 169 this.getBehindDivider()
169 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { 170 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
170 - ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg }) 171 + ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg ,bottomNavi:this.bottomNavi})
171 this.getBehindDivider() 172 this.getBehindDivider()
172 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { 173 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) {
173 // ZhSingleRow05({ compDTO }) 174 // ZhSingleRow05({ compDTO })
1 import { CompDTO, ContentDTO } from 'wdBean'; 1 import { CompDTO, ContentDTO } from 'wdBean';
2 -import { CommonConstants } from 'wdConstant'; 2 +import { BottomNavi, CommonConstants } from 'wdConstant';
3 import { DateTimeUtils } from 'wdKit'; 3 import { DateTimeUtils } from 'wdKit';
4 import { ProcessUtils } from 'wdRouter'; 4 import { ProcessUtils } from 'wdRouter';
5 import { InfomationCardClick } from '../../utils/infomationCardClick'; 5 import { InfomationCardClick } from '../../utils/infomationCardClick';
@@ -15,6 +15,7 @@ export struct ZhSingleRow04 { @@ -15,6 +15,7 @@ export struct ZhSingleRow04 {
15 @State pageId: string = ''; 15 @State pageId: string = '';
16 @State pageName: string = ''; 16 @State pageName: string = '';
17 @State compDTO: CompDTO = {} as CompDTO 17 @State compDTO: CompDTO = {} as CompDTO
  18 + bottomNavi:BottomNavi = BottomNavi.PEOPLE
18 19
19 build() { 20 build() {
20 Column() { 21 Column() {
@@ -32,30 +33,33 @@ export struct ZhSingleRow04 { @@ -32,30 +33,33 @@ export struct ZhSingleRow04 {
32 .lineHeight(25) 33 .lineHeight(25)
33 } 34 }
34 35
35 - Row() {  
36 - Text("更多")  
37 - .fontSize($r("app.float.font_size_14"))  
38 - .fontColor($r("app.color.color_999999"))  
39 - .margin({ right: 1 })  
40 - Image($r("app.media.more"))  
41 - .width(14)  
42 - .height(14)  
43 - }  
44 - .visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None :  
45 - Visibility.Visible)  
46 - .onClick(() => {  
47 - if (this.compDTO?.objectType === '11') {  
48 - ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)  
49 - } else {  
50 - const contentDTO: ContentDTO = {  
51 - objectId: this.compDTO.objectId,  
52 - objectType: this.compDTO.objectType,  
53 - linkUrl: this.compDTO.linkUrl,  
54 - pageId: this.compDTO.pageId  
55 - } as ContentDTO  
56 - ProcessUtils.processPage(contentDTO) 36 +
  37 + if(this.bottomNavi === BottomNavi.NEWS){
  38 + Row() {
  39 + Text("更多")
  40 + .fontSize($r("app.float.font_size_14"))
  41 + .fontColor($r("app.color.color_999999"))
  42 + .margin({ right: 1 })
  43 + Image($r("app.media.more"))
  44 + .width(14)
  45 + .height(14)
57 } 46 }
58 - }) 47 + .visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None :
  48 + Visibility.Visible)
  49 + .onClick(() => {
  50 + if (this.compDTO?.objectType === '11') {
  51 + ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
  52 + } else {
  53 + const contentDTO: ContentDTO = {
  54 + objectId: this.compDTO.objectId,
  55 + objectType: this.compDTO.objectType,
  56 + linkUrl: this.compDTO.linkUrl,
  57 + pageId: this.compDTO.pageId
  58 + } as ContentDTO
  59 + ProcessUtils.processPage(contentDTO)
  60 + }
  61 + })
  62 + }
59 } 63 }
60 .justifyContent(FlexAlign.SpaceBetween) 64 .justifyContent(FlexAlign.SpaceBetween)
61 .margin({ bottom: 8 }) 65 .margin({ bottom: 8 })
@@ -125,7 +125,8 @@ export struct PageComponent { @@ -125,7 +125,8 @@ export struct PageComponent {
125 nextCompDTO: compIndex === this.pageModel.compList.getDataArray().length - 1 ? new CompDTO() : this.pageModel.compList.get(compIndex + 1) as CompDTO, 125 nextCompDTO: compIndex === this.pageModel.compList.getDataArray().length - 1 ? new CompDTO() : this.pageModel.compList.get(compIndex + 1) as CompDTO,
126 compDTO: compDTO, 126 compDTO: compDTO,
127 compIndex: compIndex, 127 compIndex: compIndex,
128 - pageId: this.pageId 128 + pageId: this.pageId,
  129 + bottomNavi:this.bottomNavi
129 } 130 }
130 ) 131 )
131 } 132 }
@@ -9,6 +9,7 @@ import LoadMoreLayout from '../LoadMoreLayout' @@ -9,6 +9,7 @@ import LoadMoreLayout from '../LoadMoreLayout'
9 import TemplatePageHelp from './TemplatePageHelp' 9 import TemplatePageHelp from './TemplatePageHelp'
10 import TemplatePageModel from './TemplatePageModel' 10 import TemplatePageModel from './TemplatePageModel'
11 import { TemplatePageStateType } from './TemplatePageStateType' 11 import { TemplatePageStateType } from './TemplatePageStateType'
  12 +import { BottomNavi} from 'wdConstant/Index';
12 13
13 14
14 const TAG: string = 'TemplatePageComponent'; 15 const TAG: string = 'TemplatePageComponent';
@@ -126,7 +127,8 @@ export default struct TemplatePageComponent { @@ -126,7 +127,8 @@ export default struct TemplatePageComponent {
126 nextCompDTO: index === this.templatePage.compList.getDataArray().length - 1 ? new CompDTO() : this.templatePage.compList.get(index + 1) as CompDTO, 127 nextCompDTO: index === this.templatePage.compList.getDataArray().length - 1 ? new CompDTO() : this.templatePage.compList.get(index + 1) as CompDTO,
127 compIndex: index, 128 compIndex: index,
128 pageId: this.pageId, 129 pageId: this.pageId,
129 - pageName: this.pageName 130 + pageName: this.pageName,
  131 + bottomNavi:BottomNavi.TEMPLATE
130 }); 132 });
131 } 133 }
132 } 134 }