Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
54304361
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
54304361
编写于
7月 21, 2023
作者:
O
openharmony_ci
提交者:
Gitee
7月 21, 2023
浏览文件
操作
浏览文件
下载
差异文件
!21164 修正一些描述矛盾的点
Merge pull request !21164 from CoderAdo/master
上级
3dcfeacf
e29e12af
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
27 addition
and
15 deletion
+27
-15
zh-cn/application-dev/reference/apis/js-apis-wifi.md
zh-cn/application-dev/reference/apis/js-apis-wifi.md
+6
-6
zh-cn/application-dev/reference/apis/js-apis-wifiManager.md
zh-cn/application-dev/reference/apis/js-apis-wifiManager.md
+21
-9
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-wifi.md
浏览文件 @
54304361
...
...
@@ -96,8 +96,8 @@ isWifiActive(): boolean
import
wifi
from
'
@ohos.wifi
'
;
try
{
let
is
Activate
=
wifi
.
isActivat
e
();
console
.
info
(
"
is
Activate:
"
+
isActivat
e
);
let
is
WifiActive
=
wifi
.
isWifiActiv
e
();
console
.
info
(
"
is
WifiActive:
"
+
isWifiActiv
e
);
}
catch
(
error
){
console
.
error
(
"
failed:
"
+
JSON
.
stringify
(
error
));
}
...
...
@@ -2463,7 +2463,7 @@ off(type: "p2pDeviceChange", callback?: Callback<WifiP2pDevice>): void
import
wifi
from
'
@ohos.wifi
'
;
var
recvP2pDeviceChangeFunc
=
result
=>
{
console
.
info
(
"
Receive
recv
p2p device change event:
"
+
result
);
console
.
info
(
"
Receive p2p device change event:
"
+
result
);
}
// Register event
...
...
@@ -2513,7 +2513,7 @@ off(type: "p2pPeerDeviceChange", callback?: Callback<WifiP2pDevice[]>): vo
import
wifi
from
'
@ohos.wifi
'
;
var
recvP2pPeerDeviceChangeFunc
=
result
=>
{
console
.
info
(
"
Receive
recv
p2p peer device change event:
"
+
result
);
console
.
info
(
"
Receive p2p peer device change event:
"
+
result
);
}
// Register event
...
...
@@ -2563,7 +2563,7 @@ off(type: "p2pPersistentGroupChange", callback?: Callback<void>): void
import
wifi
from
'
@ohos.wifi
'
;
var
recvP2pPersistentGroupChangeFunc
=
result
=>
{
console
.
info
(
"
Receive
recv
p2p persistent group change event:
"
+
result
);
console
.
info
(
"
Receive p2p persistent group change event:
"
+
result
);
}
// Register event
...
...
@@ -2621,7 +2621,7 @@ off(type: "p2pDiscoveryChange", callback?: Callback<number>): void
import
wifi
from
'
@ohos.wifi
'
;
var
recvP2pDiscoveryChangeFunc
=
result
=>
{
console
.
info
(
"
Receive
recv
p2p discovery change event:
"
+
result
);
console
.
info
(
"
Receive p2p discovery change event:
"
+
result
);
}
// Register event
...
...
zh-cn/application-dev/reference/apis/js-apis-wifiManager.md
浏览文件 @
54304361
...
...
@@ -13,7 +13,7 @@ import wifiManager from '@ohos.wifiManager';
## wifi.enableWifi<sup>9+</sup>
enableWifi():
void
enableWifi():
boolean
使能WLAN。
...
...
@@ -51,7 +51,7 @@ enableWifi(): void
## wifi.disableWifi<sup>9+</sup>
disableWifi():
void
disableWifi():
boolean
去使能WLAN。
...
...
@@ -117,8 +117,8 @@ isWifiActive(): boolean
import
wifiManager
from
'
@ohos.wifiManager
'
;
try
{
let
is
Activate
=
wifiManager
.
isActivat
e
();
console
.
info
(
"
is
Activate:
"
+
isActivat
e
);
let
is
WifiActive
=
wifiManager
.
isWifiActiv
e
();
console
.
info
(
"
is
WifiActive:
"
+
isWifiActiv
e
);
}
catch
(
error
){
console
.
error
(
"
failed:
"
+
JSON
.
stringify
(
error
));
}
...
...
@@ -126,7 +126,7 @@ isWifiActive(): boolean
## wifi.scan<sup>9+</sup>
scan():
void
scan():
boolean
启动WLAN扫描。
...
...
@@ -1641,6 +1641,12 @@ isBandTypeSupported(bandType: WifiBandType): boolean
| -------- | -------- | -------- | -------- |
| bandType | WifiBandType | 是 | Wifi 频段类型。 |
**返回值:**
|
**类型**
|
**说明**
|
| -------- | -------- |
| boolean | true:支持,
false:不支持。 |
**错误码:**
以下错误码的详细介绍请参见
[
WIFI错误码
](
../errorcodes/errorcode-wifi.md
)
。
...
...
@@ -1674,6 +1680,12 @@ get5GChannelList(): Array<number>
**系统能力:**
SystemCapability.Communication.WiFi.STA
**返回值:**
|
**类型**
|
**说明**
|
| -------- | -------- |
|
Array
<
number
>
| 设备支持的5G信道列表。 |
**错误码:**
以下错误码的详细介绍请参见
[
WIFI错误码
](
../errorcodes/errorcode-wifi.md
)
。
...
...
@@ -3342,7 +3354,7 @@ off(type: "p2pDeviceChange", callback?: Callback<WifiP2pDevice>): void
import
wifiManager
from
'
@ohos.wifiManager
'
;
var
recvP2pDeviceChangeFunc
=
result
=>
{
console
.
info
(
"
Receive
recv
p2p device change event:
"
+
result
);
console
.
info
(
"
Receive p2p device change event:
"
+
result
);
}
// Register event
...
...
@@ -3407,7 +3419,7 @@ off(type: "p2pPeerDeviceChange", callback?: Callback<WifiP2pDevice[]>): vo
import
wifiManager
from
'
@ohos.wifiManager
'
;
var
recvP2pPeerDeviceChangeFunc
=
result
=>
{
console
.
info
(
"
Receive
recv
p2p peer device change event:
"
+
result
);
console
.
info
(
"
Receive p2p peer device change event:
"
+
result
);
}
// Register event
...
...
@@ -3472,7 +3484,7 @@ off(type: "p2pPersistentGroupChange", callback?: Callback<void>): void
import
wifiManager
from
'
@ohos.wifiManager
'
;
var
recvP2pPersistentGroupChangeFunc
=
result
=>
{
console
.
info
(
"
Receive
recv
p2p persistent group change event:
"
+
result
);
console
.
info
(
"
Receive p2p persistent group change event:
"
+
result
);
}
// Register event
...
...
@@ -3544,7 +3556,7 @@ off(type: "p2pDiscoveryChange", callback?: Callback<number>): void
import
wifiManager
from
'
@ohos.wifiManager
'
;
var
recvP2pDiscoveryChangeFunc
=
result
=>
{
console
.
info
(
"
Receive
recv
p2p discovery change event:
"
+
result
);
console
.
info
(
"
Receive p2p discovery change event:
"
+
result
);
}
// Register event
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录