yanlu

fix:17593 功能缺陷-【uat】直播缺少搜索按钮

@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
5 import { BottomNavDTO, TopNavDTO } from 'wdBean/Index' 5 import { BottomNavDTO, TopNavDTO } from 'wdBean/Index'
6 import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index'; 6 import { VideoChannelDetail } from 'wdDetailPlayShortVideo/Index';
7 import { PageComponent } from './PageComponent'; 7 import { PageComponent } from './PageComponent';
  8 +import { WDRouterPage, WDRouterRule } from 'wdRouter';
8 9
9 const TAG = 'VideoChannelPage' 10 const TAG = 'VideoChannelPage'
10 11
@@ -67,44 +68,66 @@ export struct VideoChannelPage { @@ -67,44 +68,66 @@ export struct VideoChannelPage {
67 68
68 @Builder 69 @Builder
69 topNavView() { 70 topNavView() {
70 - Row() {  
71 - ForEach(this.topNavList, (item: TopNavDTO, index: number) => {  
72 - Column() {  
73 - Text(item.name)  
74 - .fontSize($r('app.float.selected_text_size'))  
75 - .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)  
76 - .fontColor(this.getTopNavFontColor(item, index))  
77 - .padding({  
78 - top: $r('app.float.top_tab_item_padding_top'),  
79 - bottom: $r('app.float.top_tab_item_padding_bottom')  
80 - })  
81 - .maxLines(this.MAX_LINE) 71 + Stack({alignContent: Alignment.TopEnd}) {
  72 + Row() {
  73 + ForEach(this.topNavList, (item: TopNavDTO, index: number) => {
  74 + Column() {
  75 + Text(item.name)
  76 + .fontSize($r('app.float.selected_text_size'))
  77 + .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)
  78 + .fontColor(this.getTopNavFontColor(item, index))
  79 + .padding({
  80 + top: $r('app.float.top_tab_item_padding_top'),
  81 + bottom: $r('app.float.top_tab_item_padding_bottom')
  82 + })
  83 + .maxLines(this.MAX_LINE)
82 84
83 - Row()  
84 - .width(20)  
85 - .height(3)  
86 - .backgroundImage($r('app.media.icon_channel_active'), ImageRepeat.NoRepeat)  
87 - .backgroundImageSize(ImageSize.Contain)  
88 - .visibility(this.currentTopNavSelectedIndex === index ? Visibility.Visible : Visibility.Hidden) 85 + Row()
  86 + .width(20)
  87 + .height(3)
  88 + .backgroundImage($r('app.media.icon_channel_active'), ImageRepeat.NoRepeat)
  89 + .backgroundImageSize(ImageSize.Contain)
  90 + .visibility(this.currentTopNavSelectedIndex === index ? Visibility.Visible : Visibility.Hidden)
89 91
90 - }  
91 - .padding({  
92 - left: $r('app.float.top_tab_item_padding_horizontal'),  
93 - right: $r('app.float.top_tab_item_padding_horizontal'),  
94 - })  
95 - .onClick(() => {  
96 - if (this.currentTopNavSelectedIndex === index) {  
97 - this.autoRefresh++  
98 } 92 }
99 - this.currentTopNavSelectedIndex = index  
100 - this.swiperController.changeIndex(index, true) 93 + .padding({
  94 + left: $r('app.float.top_tab_item_padding_horizontal'),
  95 + right: $r('app.float.top_tab_item_padding_horizontal'),
  96 + })
  97 + .onClick(() => {
  98 + if (this.currentTopNavSelectedIndex === index) {
  99 + this.autoRefresh++
  100 + }
  101 + this.currentTopNavSelectedIndex = index
  102 + this.swiperController.changeIndex(index, true)
  103 +
  104 + })
  105 + }, (item: TopNavDTO) => item.channelId + '')
  106 + }
  107 + .width('100%')
  108 + .justifyContent(FlexAlign.Center)
  109 + .backgroundColor(this.currentTopNavSelectedIndex === 0 ? Color.Transparent : Color.White)
  110 +
  111 + // 搜索按钮
  112 + Row() {
  113 + Image($r('app.media.icon_search'))
  114 + .width('24vp')
  115 + .height('24vp')
  116 + }
  117 + .width('40vp')
  118 + .margin({
  119 + right: '10vp',
  120 + top: '3vp',
  121 + })
  122 + .alignItems(VerticalAlign.Center)
  123 + .justifyContent(FlexAlign.Center)
  124 + .onClick(() => {
  125 + WDRouterRule.jumpWithPage(WDRouterPage.searchPage)
  126 + })
  127 + .backgroundColor(Color.Transparent)
101 128
102 - })  
103 - }, (item: TopNavDTO) => item.channelId + '')  
104 } 129 }
105 - .width('100%')  
106 - .justifyContent(FlexAlign.Center)  
107 - .backgroundColor(this.currentTopNavSelectedIndex === 0 ? Color.Transparent : Color.White) 130 +
108 } 131 }
109 132
110 @Builder 133 @Builder