wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  js 注入时序问题修复
  desc:隐藏 控件
  通用跳转方法挪至 common
  直播列表item跳图文详情页,其他bug修复
  视频频道修改
  解决频道切换页面销毁
@@ -22,3 +22,6 @@ export { ScreenType } from './src/main/ets/enum/ScreenType'; @@ -22,3 +22,6 @@ export { ScreenType } from './src/main/ets/enum/ScreenType';
22 export { SpConstants } from './src/main/ets/constants/SpConstants'; 22 export { SpConstants } from './src/main/ets/constants/SpConstants';
23 23
24 export { DisplayDirection } from './src/main/ets/constants/VideoConstants'; 24 export { DisplayDirection } from './src/main/ets/constants/VideoConstants';
  25 +
  26 +export { ContentConstants } from './src/main/ets/constants/ContentConstants';
  27 +
  1 +export class ContentConstants {
  2 + /* content#objectType,跳转类型:0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14动态图文,15动态视频 */
  3 + /**
  4 + * 0:不跳转
  5 + */
  6 + static readonly TYPE_NONE: string = "0";
  7 + /**
  8 + * 1:点播
  9 + */
  10 + static readonly TYPE_VOD: string = "1";
  11 + /**
  12 + * 2:直播
  13 + */
  14 + static readonly TYPE_LIVE: string = "2";
  15 + /**
  16 + * 5:专题详情
  17 + */
  18 + static readonly TYPE_SPECIAL_TOPIC: string = "5";
  19 +
  20 + /**
  21 + * 6:链接
  22 + */
  23 + static readonly TYPE_LINK: string = "6";
  24 +
  25 + /**
  26 + * 8:图文详情,这里是h5页面
  27 + */
  28 + static readonly TYPE_TELETEXT: string = "8";
  29 + /**
  30 + * 9:图集
  31 + */
  32 + static readonly TYPE_NINE: string = "9";
  33 + /**
  34 + * 13:音频详情
  35 + */
  36 + static readonly TYPE_AUDIO: string = "13";
  37 +
  38 + /**
  39 + * 14:动态图文
  40 + */
  41 + static readonly TYPE_FOURTEEN: string = "14";
  42 +
  43 + /**
  44 + * 15:动态视频
  45 + */
  46 + static readonly TYPE_FIFTEEN: string = "15";
  47 +
  48 +
  49 +}
@@ -132,6 +132,10 @@ export class WindowModel { @@ -132,6 +132,10 @@ export class WindowModel {
132 }) 132 })
133 } 133 }
134 134
  135 + setWindowSystemBarEnable(names: Array<'status' | 'navigation'>) {
  136 + this.windowClass?.setWindowSystemBarEnable(names)
  137 + }
  138 +
135 setWindowLayoutFullScreen(isFullScreen: boolean) { 139 setWindowLayoutFullScreen(isFullScreen: boolean) {
136 this.isFullScreen = isFullScreen 140 this.isFullScreen = isFullScreen
137 this.windowClass?.setWindowLayoutFullScreen(isFullScreen) 141 this.windowClass?.setWindowLayoutFullScreen(isFullScreen)
@@ -2,4 +2,6 @@ export { WDRouterRule } from './src/main/ets/router/WDRouterRule' @@ -2,4 +2,6 @@ export { WDRouterRule } from './src/main/ets/router/WDRouterRule'
2 2
3 export { WDRouterPage } from './src/main/ets/router/WDRouterPage' 3 export { WDRouterPage } from './src/main/ets/router/WDRouterPage'
4 4
5 -export { registerRouter } from './src/main/ets/router/Action2Page'  
  5 +export { registerRouter } from './src/main/ets/router/Action2Page'
  6 +
  7 +export { ProcessUtils } from './src/main/ets/utils/ProcessUtils'
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 "dependencies": { 9 "dependencies": {
10 "wdKit": "file:../wdKit", 10 "wdKit": "file:../wdKit",
11 "wdBean": "file:../../features/wdBean", 11 "wdBean": "file:../../features/wdBean",
12 - "wdNetwork": "file:../../commons/wdNetwork" 12 + "wdNetwork": "file:../../commons/wdNetwork",
  13 + "wdConstant": "file:../../commons/wdConstant"
13 } 14 }
14 } 15 }
  1 +import { Action, ContentDTO, Params } from 'wdBean';
  2 +import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';
  3 +import { Logger } from 'wdKit';
  4 +import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
  5 +import { WDRouterRule } from '../router/WDRouterRule';
  6 +import { ContentConstants } from 'wdConstant';
  7 +// import { LiveModel } from '../viewmodel/LiveModel';
  8 +
  9 +const TAG = 'ProcessUtils';
  10 +
  11 +/**
  12 + * 页面跳转业务封装
  13 + */
  14 +export class ProcessUtils {
  15 + /**
  16 + * 页面跳转
  17 + */
  18 + static processPage(content: ContentDTO) {
  19 + if (content == null) {
  20 + Logger.error(TAG, "processPage, content is null");
  21 + return;
  22 + }
  23 + if (StringUtils.isEmpty(content.objectType)) {
  24 + Logger.error(TAG, "processPage, objectType is empty");
  25 + return;
  26 + }
  27 + let type = content.objectType;
  28 + console.log(TAG,'objectType',`${JSON.stringify(content)}`);
  29 + switch (type) {
  30 + case ContentConstants.TYPE_NONE:
  31 + Logger.debug(TAG, "processPage, do nothing");
  32 + break;
  33 + case ContentConstants.TYPE_VOD:
  34 + Logger.debug(TAG, "processPage, nonsupport!!!");
  35 + ProcessUtils.gotoVod(content)
  36 + break;
  37 + case ContentConstants.TYPE_LIVE:
  38 + ProcessUtils.gotoLive(content)
  39 + break
  40 + case ContentConstants.TYPE_AUDIO:
  41 + ProcessUtils.gotoAudio(content)
  42 + break;
  43 + case ContentConstants.TYPE_TELETEXT:
  44 + // 图文详情,跳转h5
  45 + ProcessUtils.gotoWeb(content);
  46 + break;
  47 + case ContentConstants.TYPE_LINK:
  48 + ProcessUtils.gotoDefaultWeb(content);
  49 + break;
  50 + //图集详情页
  51 + case ContentConstants.TYPE_NINE:
  52 + ProcessUtils.gotoAtlasDetailPage(content);
  53 + break;
  54 + case ContentConstants.TYPE_SPECIAL_TOPIC:
  55 + // 专题详情,跳转h5
  56 + ProcessUtils.gotoSpecialTopic(content);
  57 + break;
  58 + //动态详情页(动态图文)
  59 + case ContentConstants.TYPE_FOURTEEN:
  60 + break;
  61 + //动态详情页(动态视频)
  62 + case ContentConstants.TYPE_FIFTEEN:
  63 + ProcessUtils.gotoWeb(content);
  64 + break;
  65 + default:
  66 + break;
  67 + }
  68 + }
  69 +
  70 + /**
  71 + * 动态详情页(动态视频/动态图片)
  72 + * @param content
  73 + * */
  74 + private static gotoDynamicDetailPage(content: ContentDTO) {
  75 + let taskAction: Action = {
  76 + type: 'JUMP_DETAIL_PAGE',
  77 + params: {
  78 + detailPageType: 14,
  79 + contentID: content?.objectId,
  80 + extra: {
  81 + relType: content?.relType,
  82 + relId: content?.relId,
  83 + } as ExtraDTO
  84 + } as Params,
  85 + };
  86 + WDRouterRule.jumpWithAction(taskAction)
  87 + Logger.debug(TAG, `gotoDynamicDetailPage, ${content.objectId}`);
  88 + }
  89 +
  90 + /**
  91 + * 图集详情页
  92 + * @param content
  93 + * */
  94 + private static gotoAtlasDetailPage(content: ContentDTO) {
  95 + let taskAction: Action = {
  96 + type: 'JUMP_DETAIL_PAGE',
  97 + params: {
  98 + detailPageType: 17,
  99 + contentID: content?.objectId,
  100 + extra: {
  101 + relType: content?.relType,
  102 + relId: content?.relId,
  103 + } as ExtraDTO
  104 + } as Params,
  105 + };
  106 + WDRouterRule.jumpWithAction(taskAction)
  107 + Logger.debug(TAG, `gotoAtlasDetailPage, ${content.objectId}`);
  108 + }
  109 +
  110 + private static gotoSpecialTopic(content: ContentDTO) {
  111 + let taskAction: Action = {
  112 + type: 'JUMP_INNER_NEW_PAGE',
  113 + params: {
  114 + url: content.linkUrl,
  115 + pageID: 'SPACIAL_TOPIC_PAGE',
  116 + } as Params,
  117 + };
  118 + WDRouterRule.jumpWithAction(taskAction)
  119 + }
  120 +
  121 + private static gotoDefaultWeb(content: ContentDTO) {
  122 + let taskAction: Action = {
  123 + type: 'JUMP_H5_BY_WEB_VIEW',
  124 + params: {
  125 + url: content.linkUrl,
  126 + } as Params,
  127 + };
  128 + WDRouterRule.jumpWithAction(taskAction)
  129 + Logger.debug(TAG, `gotoWeb, ${content.objectId}`);
  130 + }
  131 +
  132 + private static gotoWeb(content: ContentDTO) {
  133 + let taskAction: Action = {
  134 + type: 'JUMP_INNER_NEW_PAGE',
  135 + params: {
  136 + contentID: content?.objectId,
  137 + pageID: 'IMAGE_TEXT_DETAIL',
  138 + extra: {
  139 + relType: content?.relType,
  140 + relId: content?.relId,
  141 + channelId: content?.channelId,
  142 + sourcePage: '5'
  143 + } as ExtraDTO
  144 + } as Params,
  145 + };
  146 + WDRouterRule.jumpWithAction(taskAction)
  147 + Logger.debug(TAG, `gotoWeb, ${content.objectId}`);
  148 + }
  149 +
  150 + private static gotoVod(content: ContentDTO) {
  151 + let taskAction: Action = {
  152 + type: 'JUMP_DETAIL_PAGE',
  153 + params: {
  154 + detailPageType: 7,
  155 + contentID: content?.objectId,
  156 + extra: {
  157 + relType: content?.relType,
  158 + relId: content?.relId,
  159 + } as ExtraDTO
  160 + } as Params,
  161 + };
  162 + WDRouterRule.jumpWithAction(taskAction)
  163 + Logger.debug(TAG, `gotoVod, ${content.objectId}`);
  164 + }
  165 +
  166 + private static async gotoLive(content: ContentDTO) {
  167 + // const liveDetail = await LiveModel.getLiveDetails(content?.objectId || '', content?.relId || '', content?.relType || '')
  168 + // const liveStyle = liveDetail[0].liveInfo.liveStyle
  169 + // const liveState = liveDetail[0].liveInfo.liveState
  170 + let taskAction: Action = {
  171 + type: 'JUMP_DETAIL_PAGE',
  172 + params: {
  173 + detailPageType: 2,
  174 + contentID: content?.objectId,
  175 + // liveStyle: liveState === 'wait' ? 0 : liveStyle,
  176 + liveStyle: 0 ,
  177 + extra: {
  178 + relType: content?.relType,
  179 + relId: content?.relId,
  180 + } as ExtraDTO
  181 + } as Params,
  182 + };
  183 + WDRouterRule.jumpWithAction(taskAction)
  184 + Logger.debug(TAG, `gotoLive, ${content.objectId}`);
  185 + }
  186 +
  187 + private static gotoAudio(content: ContentDTO) {
  188 + let taskAction: Action = {
  189 + type: 'JUMP_DETAIL_PAGE',
  190 + params: {
  191 + detailPageType: 13,
  192 + contentID: content?.objectId,
  193 + extra: {
  194 + relType: content?.relType,
  195 + relId: content?.relId,
  196 + } as ExtraDTO
  197 + } as Params,
  198 + };
  199 + WDRouterRule.jumpWithAction(taskAction)
  200 + Logger.debug(TAG, `gotoAudio, ${content.objectId}`);
  201 + }
  202 +}
@@ -7,7 +7,7 @@ import { performJSCallNative } from './JsBridgeBiz'; @@ -7,7 +7,7 @@ import { performJSCallNative } from './JsBridgeBiz';
7 import { H5CallNativeType } from './H5CallNativeType'; 7 import { H5CallNativeType } from './H5CallNativeType';
8 import { Message } from 'wdJsBridge/src/main/ets/bean/Message'; 8 import { Message } from 'wdJsBridge/src/main/ets/bean/Message';
9 9
10 -const TAG = 'WdWebLocalComponent'; 10 +const TAG = 'WdWebComponent';
11 11
12 @Component 12 @Component
13 export struct WdWebComponent { 13 export struct WdWebComponent {
@@ -85,9 +85,10 @@ export struct WdWebComponent { @@ -85,9 +85,10 @@ export struct WdWebComponent {
85 onPageBegin: (url?: string) => void = () => { 85 onPageBegin: (url?: string) => void = () => {
86 Logger.debug(TAG, 'onPageBegin'); 86 Logger.debug(TAG, 'onPageBegin');
87 this.registerHandlers(); 87 this.registerHandlers();
88 - // setTimeout(() => {  
89 - BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)  
90 - // }, 100) 88 + //有时序问题 必须延时执行
  89 + setTimeout(() => {
  90 + BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)
  91 + }, 200)
91 } 92 }
92 onPageEnd: (url?: string) => void = () => { 93 onPageEnd: (url?: string) => void = () => {
93 Logger.debug(TAG, 'onPageEnd'); 94 Logger.debug(TAG, 'onPageEnd');
@@ -102,9 +102,10 @@ export struct WdWebLocalComponent { @@ -102,9 +102,10 @@ export struct WdWebLocalComponent {
102 onPageBegin: (url?: string) => void = () => { 102 onPageBegin: (url?: string) => void = () => {
103 Logger.debug(TAG, 'onPageBegin'); 103 Logger.debug(TAG, 'onPageBegin');
104 this.registerHandlers(); 104 this.registerHandlers();
105 - // setTimeout(() => {  
106 - BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)  
107 - // }, 100) 105 + //有时序问题 必须延时执行
  106 + setTimeout(() => {
  107 + BridgeUtil.webViewLoadLocalJs(getContext(this), this.webviewControl)
  108 + }, 200)
108 } 109 }
109 onPageEnd: (url?: string) => void = () => { 110 onPageEnd: (url?: string) => void = () => {
110 Logger.debug(TAG, 'onPageEnd'); 111 Logger.debug(TAG, 'onPageEnd');
@@ -83,9 +83,11 @@ export default struct MinePagePersonFunctionUI { @@ -83,9 +83,11 @@ export default struct MinePagePersonFunctionUI {
83 .height('117lpx') 83 .height('117lpx')
84 }) 84 })
85 } 85 }
86 - .rowsTemplate('1fr 1fr') 86 + // .rowsTemplate('1fr 1fr')
  87 + .rowsTemplate('1fr')
87 .columnsTemplate('1fr 1fr 1fr 1fr') 88 .columnsTemplate('1fr 1fr 1fr 1fr')
88 - .height('234lpx') 89 + // .height('234lpx')
  90 + .height('167lpx')
89 .margin({top:'31lpx',left:'23lpx',right:'23lpx' }) 91 .margin({top:'31lpx',left:'23lpx',right:'23lpx' })
90 } 92 }
91 } 93 }
@@ -119,6 +119,7 @@ export default struct MinePageUserSimpleInfoUI { @@ -119,6 +119,7 @@ export default struct MinePageUserSimpleInfoUI {
119 .width('50lpx') 119 .width('50lpx')
120 .height('50lpx') 120 .height('50lpx')
121 }.width('131lpx') 121 }.width('131lpx')
  122 + .visibility(Visibility.Hidden)
122 }.backgroundColor($r('app.color.white')) 123 }.backgroundColor($r('app.color.white'))
123 .setFullWidth() 124 .setFullWidth()
124 .padding({top:'31lpx',left:'46lpx'}) 125 .padding({top:'31lpx',left:'46lpx'})
@@ -68,6 +68,7 @@ export struct BottomNavigationComponent { @@ -68,6 +68,7 @@ export struct BottomNavigationComponent {
68 groupId: navItem.id, 68 groupId: navItem.id,
69 topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073), 69 topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),
70 _currentNavIndex: this.currentNavIndex, 70 _currentNavIndex: this.currentNavIndex,
  71 + currentBottomNavName: navItem.name,
71 changeBarBackgroundColor: (color: Color) => { 72 changeBarBackgroundColor: (color: Color) => {
72 this.barBackgroundColor = color 73 this.barBackgroundColor = color
73 } 74 }
@@ -80,6 +81,7 @@ export struct BottomNavigationComponent { @@ -80,6 +81,7 @@ export struct BottomNavigationComponent {
80 }); 81 });
81 82
82 } 83 }
  84 + .animationDuration(0)
83 .barHeight($r('app.float.bottom_navigation_barHeight')) 85 .barHeight($r('app.float.bottom_navigation_barHeight'))
84 .barMode(BarMode.Fixed) 86 .barMode(BarMode.Fixed)
85 // TODO:更详细的判断是视频频道 87 // TODO:更详细的判断是视频频道
@@ -86,9 +86,8 @@ struct ReserveMorePage { @@ -86,9 +86,8 @@ struct ReserveMorePage {
86 // .title('直播列表') 86 // .title('直播列表')
87 87
88 Column() { 88 Column() {
  89 + this.TabbarNormal()
89 Column() { 90 Column() {
90 - this.TabbarNormal()  
91 -  
92 this.ListLayout() 91 this.ListLayout()
93 } 92 }
94 .padding({ 93 .padding({
@@ -22,6 +22,7 @@ const storage = LocalStorage.getShared(); @@ -22,6 +22,7 @@ const storage = LocalStorage.getShared();
22 @Component 22 @Component
23 export struct TopNavigationComponent { 23 export struct TopNavigationComponent {
24 private groupId: number = 0 24 private groupId: number = 0
  25 + private currentBottomNavName: string = ''
25 private tabsController: TabsController = new TabsController() 26 private tabsController: TabsController = new TabsController()
26 private changeBarBackgroundColor: (color: Color) => void = () => { 27 private changeBarBackgroundColor: (color: Color) => void = () => {
27 } 28 }
@@ -156,20 +157,20 @@ export struct TopNavigationComponent { @@ -156,20 +157,20 @@ export struct TopNavigationComponent {
156 if (this._currentNavIndex === 2 && this.currentTopNavSelectedIndex == 0) { 157 if (this._currentNavIndex === 2 && this.currentTopNavSelectedIndex == 0) {
157 this.barBackgroundColor = Color.Black 158 this.barBackgroundColor = Color.Black
158 this.changeBarBackgroundColor && this.changeBarBackgroundColor(this.barBackgroundColor) 159 this.changeBarBackgroundColor && this.changeBarBackgroundColor(this.barBackgroundColor)
159 - WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })  
160 - WindowModel.shared.setWindowLayoutFullScreen(true)  
161 - this.isLayoutFullScreen = true  
162 - this.bottomRectHeight = this.bottomSafeHeight  
163 - this.topRectHeight = this.topSafeHeight 160 + // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
  161 + // WindowModel.shared.setWindowLayoutFullScreen(true)
  162 + // this.isLayoutFullScreen = true
  163 + // this.bottomRectHeight = this.bottomSafeHeight
  164 + // this.topRectHeight = this.topSafeHeight
164 165
165 } else { 166 } else {
166 this.barBackgroundColor = Color.Transparent 167 this.barBackgroundColor = Color.Transparent
167 this.changeBarBackgroundColor && this.changeBarBackgroundColor(this.barBackgroundColor) 168 this.changeBarBackgroundColor && this.changeBarBackgroundColor(this.barBackgroundColor)
168 - WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })  
169 - WindowModel.shared.setWindowLayoutFullScreen(false)  
170 - this.isLayoutFullScreen = false  
171 - this.bottomRectHeight = 0  
172 - this.topRectHeight = 0 169 + // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
  170 + // WindowModel.shared.setWindowLayoutFullScreen(false)
  171 + // this.isLayoutFullScreen = false
  172 + // this.bottomRectHeight = 0
  173 + // this.topRectHeight = 0
173 } 174 }
174 } 175 }
175 176
@@ -225,9 +226,9 @@ export struct TopNavigationComponent { @@ -225,9 +226,9 @@ export struct TopNavigationComponent {
225 // 频道分类list 226 // 频道分类list
226 Stack({ alignContent: Alignment.TopEnd }) { 227 Stack({ alignContent: Alignment.TopEnd }) {
227 Tabs({ index: this.currentTopNavSelectedIndex, controller: this.tabsController }) { 228 Tabs({ index: this.currentTopNavSelectedIndex, controller: this.tabsController }) {
228 - ForEach(this._currentNavIndex === 0 ? this.myChannelList : this.topNavList, (navItem: TopNavDTO, index: number) => { 229 + ForEach(this.currentBottomNavName === '新闻' ? this.myChannelList : this.topNavList, (navItem: TopNavDTO, index: number) => {
229 TabContent() { 230 TabContent() {
230 - if (this._currentNavIndex === 2 && navItem.name === '视频') { 231 + if (this.currentBottomNavName === '视频' && navItem.name === '视频') {
231 VideoChannelDetail({ 232 VideoChannelDetail({
232 bottomNavIndex: this._currentNavIndex, 233 bottomNavIndex: this._currentNavIndex,
233 topNavIndex: this.currentTopNavSelectedIndex, 234 topNavIndex: this.currentTopNavSelectedIndex,
@@ -6,6 +6,8 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' @@ -6,6 +6,8 @@ import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
6 import { CardMediaInfo } from '../cardCommon/CardMediaInfo' 6 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
7 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO' 7 import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'
8 import { LiveModel } from '../../viewmodel/LiveModel' 8 import { LiveModel } from '../../viewmodel/LiveModel'
  9 +import { ContentConstants } from '../../constants/ContentConstants'
  10 +import { ProcessUtils } from '../../utils/ProcessUtils'
9 11
10 @Component 12 @Component
11 export struct LiveHorizontalCardComponent { 13 export struct LiveHorizontalCardComponent {
@@ -25,7 +27,7 @@ export struct LiveHorizontalCardComponent { @@ -25,7 +27,7 @@ export struct LiveHorizontalCardComponent {
25 .fontWeight(600) 27 .fontWeight(600)
26 } 28 }
27 29
28 - if (this.compDTO.operDataList.length > 2) { 30 + if (this.compDTO.dataSourceType === 'LIVE_HORIZONTAL_CARD' || this.compDTO.dataSourceType === 'LIVE_MONTHLY_RANKING') {
29 Row() { 31 Row() {
30 Text("更多") 32 Text("更多")
31 .fontSize($r("app.float.font_size_14")) 33 .fontSize($r("app.float.font_size_14"))
@@ -118,26 +120,34 @@ export struct LiveHorizontalCardComponent { @@ -118,26 +120,34 @@ export struct LiveHorizontalCardComponent {
118 120
119 async gotoLive(content: ContentDTO) { 121 async gotoLive(content: ContentDTO) {
120 const liveDetail = await LiveModel.getLiveDetails(content?.objectId || '', content?.relId || '', content?.relType || '') 122 const liveDetail = await LiveModel.getLiveDetails(content?.objectId || '', content?.relId || '', content?.relType || '')
121 - const liveStyle = liveDetail[0].liveInfo.liveStyle  
122 - const liveState = liveDetail[0].liveInfo.liveState 123 + if (content && content.objectType) {
  124 + if (content.objectType === ContentConstants.TYPE_LIVE) {
  125 + if (liveDetail && liveDetail[0] && liveDetail[0].liveInfo) {
  126 + const liveStyle = liveDetail[0].liveInfo.liveStyle
  127 + const liveState = liveDetail[0].liveInfo.liveState
123 128
  129 + console.error('liveDetail===', liveDetail)
124 130
125 - console.error('liveDetail===', liveDetail) 131 + let taskAction: Action = {
  132 + type: 'JUMP_DETAIL_PAGE',
  133 + params: {
  134 + detailPageType: 2,
  135 + contentID: content?.objectId,
  136 + liveStyle: liveState === 'wait' ? 0 : liveStyle,
  137 + extra: {
  138 + relType: content?.relType,
  139 + relId: content?.relId,
  140 + } as ExtraDTO
  141 + } as Params,
  142 + };
  143 + WDRouterRule.jumpWithAction(taskAction)
  144 + // Logger.debug(TAG, `gotoLive, ${content.objectId}`);
  145 + }
  146 + } else if (content.objectType === ContentConstants.TYPE_TELETEXT) {
  147 + ProcessUtils.processPage(content)
  148 + }
  149 + }
126 150
127 151
128 - let taskAction: Action = {  
129 - type: 'JUMP_DETAIL_PAGE',  
130 - params: {  
131 - detailPageType: 2,  
132 - contentID: content?.objectId,  
133 - liveStyle: liveState === 'wait' ? 0 : liveStyle,  
134 - extra: {  
135 - relType: content?.relType,  
136 - relId: content?.relId,  
137 - } as ExtraDTO  
138 - } as Params,  
139 - };  
140 - WDRouterRule.jumpWithAction(taskAction)  
141 - // Logger.debug(TAG, `gotoLive, ${content.objectId}`);  
142 } 152 }
143 } 153 }
@@ -26,7 +26,7 @@ export struct LiveHorizontalReservationComponent { @@ -26,7 +26,7 @@ export struct LiveHorizontalReservationComponent {
26 .fontWeight(600) 26 .fontWeight(600)
27 } 27 }
28 28
29 - if (this.compDTO.operDataList.length > 2) { 29 + if (this.compDTO.dataSourceType === 'LIVE_RESERVATION') {
30 Row() { 30 Row() {
31 Text("更多") 31 Text("更多")
32 .fontSize($r("app.float.font_size_14")) 32 .fontSize($r("app.float.font_size_14"))
@@ -62,10 +62,10 @@ class MinePageDatasModel{ @@ -62,10 +62,10 @@ class MinePageDatasModel{
62 this.personalData.push(new MinePagePersonalFunctionsItem("评论",$r('app.media.mine_comment_icon'))) 62 this.personalData.push(new MinePagePersonalFunctionsItem("评论",$r('app.media.mine_comment_icon')))
63 this.personalData.push(new MinePagePersonalFunctionsItem("关注",$r('app.media.mine_follow_icon'))) 63 this.personalData.push(new MinePagePersonalFunctionsItem("关注",$r('app.media.mine_follow_icon')))
64 this.personalData.push(new MinePagePersonalFunctionsItem("收藏",$r('app.media.mine_collect_icon'))) 64 this.personalData.push(new MinePagePersonalFunctionsItem("收藏",$r('app.media.mine_collect_icon')))
65 - this.personalData.push(new MinePagePersonalFunctionsItem("历史",$r('app.media.mine_history_icon')))  
66 - this.personalData.push(new MinePagePersonalFunctionsItem("消息",$r('app.media.mine_msg_icon')))  
67 - this.personalData.push(new MinePagePersonalFunctionsItem("留言板",$r('app.media.mine_msgboard_icon')))  
68 - this.personalData.push(new MinePagePersonalFunctionsItem("预约",$r('app.media.mine_order_icon'))) 65 + // this.personalData.push(new MinePagePersonalFunctionsItem("历史",$r('app.media.mine_history_icon')))
  66 + // this.personalData.push(new MinePagePersonalFunctionsItem("消息",$r('app.media.mine_msg_icon')))
  67 + // this.personalData.push(new MinePagePersonalFunctionsItem("留言板",$r('app.media.mine_msgboard_icon')))
  68 + // this.personalData.push(new MinePagePersonalFunctionsItem("预约",$r('app.media.mine_order_icon')))
69 return this.personalData 69 return this.personalData
70 } 70 }
71 71
@@ -93,9 +93,9 @@ class MinePageDatasModel{ @@ -93,9 +93,9 @@ class MinePageDatasModel{
93 if(this.moreData.length === 5){ 93 if(this.moreData.length === 5){
94 return this.moreData 94 return this.moreData
95 } 95 }
96 - this.moreData.push(new MinePageMoreFunctionModel("扫一扫",$r('app.media.mine_scan')))  
97 - this.moreData.push(new MinePageMoreFunctionModel("我的奖品",$r('app.media.mine_mygift')))  
98 - this.moreData.push(new MinePageMoreFunctionModel("意见反馈",$r('app.media.mine_suggest'))) 96 + // this.moreData.push(new MinePageMoreFunctionModel("扫一扫",$r('app.media.mine_scan')))
  97 + // this.moreData.push(new MinePageMoreFunctionModel("我的奖品",$r('app.media.mine_mygift')))
  98 + // this.moreData.push(new MinePageMoreFunctionModel("意见反馈",$r('app.media.mine_suggest')))
99 this.moreData.push(new MinePageMoreFunctionModel("设置",$r('app.media.mine_setting'))) 99 this.moreData.push(new MinePageMoreFunctionModel("设置",$r('app.media.mine_setting')))
100 this.moreData.push(new MinePageMoreFunctionModel("关于",$r('app.media.mine_about'))) 100 this.moreData.push(new MinePageMoreFunctionModel("关于",$r('app.media.mine_about')))
101 return this.moreData 101 return this.moreData
@@ -2,7 +2,7 @@ import { Action, ContentDetailDTO, InteractDataDTO } from 'wdBean/Index'; @@ -2,7 +2,7 @@ import { Action, ContentDetailDTO, InteractDataDTO } from 'wdBean/Index';
2 import { ContentDetailRequest } from 'wdDetailPlayApi/Index' 2 import { ContentDetailRequest } from 'wdDetailPlayApi/Index'
3 import { ResponseDTO } from 'wdNetwork/Index'; 3 import { ResponseDTO } from 'wdNetwork/Index';
4 import { DetailPlayShortVideoPage } from './DetailPlayShortVideoPage' 4 import { DetailPlayShortVideoPage } from './DetailPlayShortVideoPage'
5 -import { Test } from './Test' 5 +// import { Test } from './Test'
6 import router from '@ohos.router'; 6 import router from '@ohos.router';
7 import window from '@ohos.window'; 7 import window from '@ohos.window';
8 import { 8 import {
@@ -12,7 +12,7 @@ import { @@ -12,7 +12,7 @@ import {
12 contentsItem, 12 contentsItem,
13 getRecCompInfoParams 13 getRecCompInfoParams
14 } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; 14 } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
15 -import { WindowModel } from 'wdKit/Index'; 15 +import { Logger, WindowModel } from 'wdKit/Index';
16 import { BusinessError } from '@kit.BasicServicesKit'; 16 import { BusinessError } from '@kit.BasicServicesKit';
17 17
18 interface loadMoreData { 18 interface loadMoreData {
@@ -21,6 +21,9 @@ interface loadMoreData { @@ -21,6 +21,9 @@ interface loadMoreData {
21 loadStrategy: string; 21 loadStrategy: string;
22 } 22 }
23 23
  24 +const TAG = 'VideoChannelDetail'
  25 +let timer: number = -1
  26 +
24 @Entry 27 @Entry
25 @Component 28 @Component
26 export struct VideoChannelDetail { 29 export struct VideoChannelDetail {
@@ -48,33 +51,49 @@ export struct VideoChannelDetail { @@ -48,33 +51,49 @@ export struct VideoChannelDetail {
48 * 监听视频频道激活或失活 51 * 监听视频频道激活或失活
49 */ 52 */
50 navIndexChange() { 53 navIndexChange() {
51 - if (this.bottomNavIndex === 2 && this.topNavIndex === 0) {  
52 - // 如果视频在暂停则播放视频  
53 - this.switchVideoStatus = true  
54 - } else {  
55 - // 如果视频在播放则暂停视频  
56 - this.switchVideoStatus = false  
57 - } 54 + if (timer) clearTimeout(timer)
  55 +
  56 + timer = setTimeout(() => {
  57 + if (this.bottomNavIndex === 2 && this.topNavIndex === 0) {
  58 + // 如果视频在暂停则播放视频
  59 + this.switchVideoStatus = true
  60 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', statusBarColor: '#000000' })
  61 + } else {
  62 + // 如果视频在播放则暂停视频
  63 + this.switchVideoStatus = false
  64 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', statusBarColor: '#ffffff' })
  65 + // WindowModel.shared.setWindowLayoutFullScreen(false)
  66 + }
  67 + timer = -1
  68 + }, 100)
  69 +
58 70
59 } 71 }
60 72
61 - async aboutToAppear(): Promise<void> {  
62 - WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) 73 + aboutToAppear() {
  74 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', statusBarColor: '#000000' })
  75 + // WindowModel.shared.setWindowLayoutFullScreen(true)
63 // 根据视频频道传参查询视频楼层信息 76 // 根据视频频道传参查询视频楼层信息
64 this.getRecCompInfo() 77 this.getRecCompInfo()
  78 + Logger.info(TAG, 'aboutToAppear');
65 } 79 }
66 80
67 aboutToDisappear(): void { 81 aboutToDisappear(): void {
68 - WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })  
69 - console.error('aboutToDisappear videoChanel') 82 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', statusBarColor: '#ffffff' })
  83 + // WindowModel.shared.setWindowLayoutFullScreen(false)
  84 + Logger.info(TAG, 'aboutToDisappear');
70 } 85 }
71 86
72 - onPageHide(): void {  
73 - console.error('onPageHide videoChanel') 87 + onPageShow(): void {
  88 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', statusBarColor: '#000000' })
  89 + // WindowModel.shared.setWindowLayoutFullScreen(true)
  90 + Logger.info(TAG, 'onPageShow');
74 } 91 }
75 92
76 - onPageShow(): void {  
77 - console.error('onPageShow videoChanel') 93 + onPageHide(): void {
  94 + WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', statusBarColor: '#ffffff' })
  95 + // WindowModel.shared.setWindowLayoutFullScreen(false)
  96 + Logger.info(TAG, 'onPageHide');
78 } 97 }
79 98
80 /** 99 /**