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

修改代码示例问题

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