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
zhangbo1_wd
2024-04-24 09:28:57 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0eb5b6d22a191e99fe9d8726d0b21dcae9be905b
0eb5b6d2
1 parent
0d59bc49
新增网络是否连接判断方法
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
sight_harmony/commons/wdKit/src/main/ets/utils/NetworkUtil.ets
sight_harmony/commons/wdKit/src/main/ets/utils/NetworkUtil.ets
View file @
0eb5b6d
...
...
@@ -36,4 +36,16 @@ export class NetworkUtil {
return NetworkUtil.TYPE_NONE;
}
}
/**
* 判断网络是否已连接
* @returns
*/
static isNetConnected(): boolean {
let type = NetworkManager.getInstance().getNetType()
if (type == NetworkType.TYPE_NONE) {
return false
}
return true
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment