Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
王士厅
2024-09-23 16:35:48 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e73e481f2d8d81fc9b2d7e454bdaddae1e5f8072
e73e481f
1 parent
a2ba40eb
fix: 沉浸式播放时关闭网络,恢复网络后,切换到直播tab,tab列表内容未自动重新加载
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
View file @
e73e481
import { CommonConstants, ViewType } from 'wdConstant';
import { Logger } from 'wdKit';
import { Logger
, NetworkUtil
} from 'wdKit';
import { EmptyComponent } from '../view/EmptyComponent';
import PageModel from '../../viewmodel/PageModel';
import { autoRefresh, onActionEnd, onActionStart, onActionUpdate } from '../../utils/PullDownRefresh';
...
...
@@ -41,6 +41,7 @@ export struct PageComponent {
private pageTrackBean: PageTrackBean = new PageTrackBean()
// 国殇灰度管理
GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage')
@State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图
build() {
Column() {
...
...
@@ -278,19 +279,26 @@ export struct PageComponent {
if (this.navIndex === this.currentTopNavSelectedIndex) {
this.getData();
this.needload = false;
// console.log(TAG, 'aboutToAppear onAutoRefresh111 ' + this.needload)
}
}
onChange() {
Logger.info(TAG,
`onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
// console.log(TAG, `onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
// 注册监听网络连接
this.netStatus = undefined
let netStatus = NetworkUtil.isNetConnected()
if (netStatus) {
if (this.navIndex === this.currentTopNavSelectedIndex) {
Logger.debu
g(TAG, 'page onAutoRefresh111 ' + this.needload)
// console.lo
g(TAG, 'page onAutoRefresh111 ' + this.needload)
if (this.needload) {
this.getData();
}
this.needload = false;
}
} else {
this.pageModel.viewType = ViewType.EMPTY;
}
}
onAutoRefresh() {
...
...
Please
register
or
login
to post a comment