提交 0d85ee13 编写于 作者: L liujiaojiao

修改代码示例问题

Signed-off-by: Nliujiaojiao <liujiaojiao9@huawei.com>
上级 25306ab9
......@@ -680,7 +680,7 @@ try {
let rssi = 0;
let band = 0;
let level = wifi.getSignalLevel(rssi,band);
console.info("lelvel:" + JSON.stringify(lelvel));
console.info("level:" + JSON.stringify(level));
}catch(error){
console.error("failed:" + JSON.stringify(error));
}
......@@ -886,7 +886,7 @@ isFeatureSupported(featureId: number): boolean
import wifi from '@ohos.wifi';
try {
let featureId = 0
let featureId = 0;
let ret = wifi.isFeatureSupported(featureId);
console.info("isFeatureSupported:" + ret);
}catch(error){
......@@ -1278,10 +1278,10 @@ disableHotspot(): boolean
**示例:**
```js
import wifi from '@ohos.wifiManager';
import wifi from '@ohos.wifi';
try {
wifiManager.disableHotspot();
wifi.disableHotspot();
}catch(error){
console.error("failed:" + JSON.stringify(error));
}
......@@ -2043,7 +2043,7 @@ import wifi from '@ohos.wifi';
try {
let name = "****";
wifi.setDeviceName(netId);
wifi.setDeviceName(name);
}catch(error){
console.error("failed:" + JSON.stringify(error));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册