Showing
6 changed files
with
28 additions
and
3 deletions
| @@ -456,6 +456,7 @@ export class ProcessUtils { | @@ -456,6 +456,7 @@ export class ProcessUtils { | ||
| 456 | pageID: 'FeedBackActivity' | 456 | pageID: 'FeedBackActivity' |
| 457 | } as Params, | 457 | } as Params, |
| 458 | }; | 458 | }; |
| 459 | + | ||
| 459 | WDRouterRule.jumpWithAction(taskAction) | 460 | WDRouterRule.jumpWithAction(taskAction) |
| 460 | } | 461 | } |
| 461 | 462 | ||
| @@ -463,6 +464,7 @@ export class ProcessUtils { | @@ -463,6 +464,7 @@ export class ProcessUtils { | ||
| 463 | * 跳转到登录页 | 464 | * 跳转到登录页 |
| 464 | */ | 465 | */ |
| 465 | public static gotoLoginPage() { | 466 | public static gotoLoginPage() { |
| 467 | + | ||
| 466 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | 468 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) |
| 467 | } | 469 | } |
| 468 | } | 470 | } |
| @@ -85,6 +85,7 @@ export struct BottomNavigationComponent { | @@ -85,6 +85,7 @@ export struct BottomNavigationComponent { | ||
| 85 | VideoChannelPage({ | 85 | VideoChannelPage({ |
| 86 | topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073), | 86 | topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073), |
| 87 | _currentNavIndex: $currentNavIndex, | 87 | _currentNavIndex: $currentNavIndex, |
| 88 | + autoRefresh: this.autoRefresh | ||
| 88 | }) | 89 | }) |
| 89 | } else { | 90 | } else { |
| 90 | TopNavigationComponent({ | 91 | TopNavigationComponent({ |
| @@ -13,6 +13,8 @@ export struct VideoChannelPage { | @@ -13,6 +13,8 @@ export struct VideoChannelPage { | ||
| 13 | readonly MAX_LINE: number = 1; | 13 | readonly MAX_LINE: number = 1; |
| 14 | private groupId: number = 0 | 14 | private groupId: number = 0 |
| 15 | private swiperController: SwiperController = new SwiperController() | 15 | private swiperController: SwiperController = new SwiperController() |
| 16 | + // 自动刷新触发(双击tab自动刷新) | ||
| 17 | + @Prop autoRefresh: number = 0 | ||
| 16 | @Prop topNavList: TopNavDTO[] | 18 | @Prop topNavList: TopNavDTO[] |
| 17 | @Link _currentNavIndex?: number; | 19 | @Link _currentNavIndex?: number; |
| 18 | @Consume barBackgroundColor: Color | 20 | @Consume barBackgroundColor: Color |
| @@ -91,8 +93,12 @@ export struct VideoChannelPage { | @@ -91,8 +93,12 @@ export struct VideoChannelPage { | ||
| 91 | right: $r('app.float.top_tab_item_padding_horizontal'), | 93 | right: $r('app.float.top_tab_item_padding_horizontal'), |
| 92 | }) | 94 | }) |
| 93 | .onClick(() => { | 95 | .onClick(() => { |
| 96 | + if (this.currentTopNavSelectedIndex === index) { | ||
| 97 | + this.autoRefresh++ | ||
| 98 | + } | ||
| 94 | this.currentTopNavSelectedIndex = index | 99 | this.currentTopNavSelectedIndex = index |
| 95 | this.swiperController.changeIndex(index, true) | 100 | this.swiperController.changeIndex(index, true) |
| 101 | + | ||
| 96 | }) | 102 | }) |
| 97 | }, (item: TopNavDTO) => item.channelId + '') | 103 | }, (item: TopNavDTO) => item.channelId + '') |
| 98 | } | 104 | } |
| @@ -113,6 +119,7 @@ export struct VideoChannelPage { | @@ -113,6 +119,7 @@ export struct VideoChannelPage { | ||
| 113 | groupId: this.groupId + '', | 119 | groupId: this.groupId + '', |
| 114 | pageId: item.pageId + '', | 120 | pageId: item.pageId + '', |
| 115 | channelId: item.channelId + '', | 121 | channelId: item.channelId + '', |
| 122 | + autoRefresh: this.autoRefresh, | ||
| 116 | }) | 123 | }) |
| 117 | } else { | 124 | } else { |
| 118 | // 直播 | 125 | // 直播 |
| @@ -121,7 +128,7 @@ export struct VideoChannelPage { | @@ -121,7 +128,7 @@ export struct VideoChannelPage { | ||
| 121 | navIndex: index, | 128 | navIndex: index, |
| 122 | pageId: item.pageId + '', | 129 | pageId: item.pageId + '', |
| 123 | channelId: item.channelId + '', | 130 | channelId: item.channelId + '', |
| 124 | - autoRefresh: this.autoRefresh2Page | 131 | + autoRefresh: this.autoRefresh |
| 125 | }).margin({ top: 40 }) | 132 | }).margin({ top: 40 }) |
| 126 | } | 133 | } |
| 127 | }, (item: TopNavDTO) => item.channelId + '') | 134 | }, (item: TopNavDTO) => item.channelId + '') |
| @@ -164,11 +164,12 @@ export struct PlayUIComponent { | @@ -164,11 +164,12 @@ export struct PlayUIComponent { | ||
| 164 | LottieView({ | 164 | LottieView({ |
| 165 | name: 'live_status_wait', | 165 | name: 'live_status_wait', |
| 166 | path: "lottie/live_detail_living.json", | 166 | path: "lottie/live_detail_living.json", |
| 167 | - lottieWidth: 8, | 167 | + lottieWidth: 9, |
| 168 | lottieHeight: 9, | 168 | lottieHeight: 9, |
| 169 | autoplay: true, | 169 | autoplay: true, |
| 170 | loop: true, | 170 | loop: true, |
| 171 | }) | 171 | }) |
| 172 | + .margin({ right: 2 }) | ||
| 172 | } | 173 | } |
| 173 | 174 | ||
| 174 | Text('直播中') | 175 | Text('直播中') |
| @@ -61,11 +61,12 @@ export struct PlayerTitleComponent { | @@ -61,11 +61,12 @@ export struct PlayerTitleComponent { | ||
| 61 | LottieView({ | 61 | LottieView({ |
| 62 | name: 'live_status_wait', | 62 | name: 'live_status_wait', |
| 63 | path: "lottie/live_detail_living.json", | 63 | path: "lottie/live_detail_living.json", |
| 64 | - lottieWidth: 8, | 64 | + lottieWidth: 9, |
| 65 | lottieHeight: 9, | 65 | lottieHeight: 9, |
| 66 | autoplay: true, | 66 | autoplay: true, |
| 67 | loop: true, | 67 | loop: true, |
| 68 | }) | 68 | }) |
| 69 | + .margin({ right: 2 }) | ||
| 69 | }.margin({ right: 1 }) | 70 | }.margin({ right: 1 }) |
| 70 | 71 | ||
| 71 | // Image($r('app.media.icon_live_status_running')) | 72 | // Image($r('app.media.icon_live_status_running')) |
| @@ -39,6 +39,7 @@ export struct VideoChannelDetail { | @@ -39,6 +39,7 @@ export struct VideoChannelDetail { | ||
| 39 | // private recommend?: string = '' // 0.非推荐,1.推荐; | 39 | // private recommend?: string = '' // 0.非推荐,1.推荐; |
| 40 | @Link @Watch('navIndexChange') bottomNavIndex: number | 40 | @Link @Watch('navIndexChange') bottomNavIndex: number |
| 41 | @Link @Watch('navIndexChange') topNavIndex: number | 41 | @Link @Watch('navIndexChange') topNavIndex: number |
| 42 | + @Prop @Watch('autoRefreshChange') autoRefresh: number = 0 | ||
| 42 | @Consume barBackgroundColor: Color | 43 | @Consume barBackgroundColor: Color |
| 43 | private swiperController: SwiperController = new SwiperController() | 44 | private swiperController: SwiperController = new SwiperController() |
| 44 | @Provide showComment: boolean = false | 45 | @Provide showComment: boolean = false |
| @@ -54,6 +55,18 @@ export struct VideoChannelDetail { | @@ -54,6 +55,18 @@ export struct VideoChannelDetail { | ||
| 54 | @State isMouted: boolean = false | 55 | @State isMouted: boolean = false |
| 55 | @State isRequestError: boolean = false | 56 | @State isRequestError: boolean = false |
| 56 | 57 | ||
| 58 | + autoRefreshChange() { | ||
| 59 | + if (this.topNavIndex === 0) { | ||
| 60 | + this.data = [] | ||
| 61 | + this.interactDataList = [] | ||
| 62 | + this.totalCount = 0 | ||
| 63 | + this.isMouted = false | ||
| 64 | + this.getRecCompInfo() | ||
| 65 | + this.getRecCompInfo() | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + } | ||
| 69 | + | ||
| 57 | pageShowChange() { | 70 | pageShowChange() { |
| 58 | if (this.bottomNavIndex === 2 && this.topNavIndex === 0) { | 71 | if (this.bottomNavIndex === 2 && this.topNavIndex === 0) { |
| 59 | this.barBackgroundColor = Color.Black | 72 | this.barBackgroundColor = Color.Black |
-
Please register or login to post a comment