提交 d96d1407 编写于 作者: @ @shi-xiaoxiao-iris

[分布式硬件]示例代码修改

Signed-off-by: N@shi-xiaoxiao-iris <shixiaoxiao2@huawei.com>
上级 91087e07
......@@ -294,15 +294,11 @@ getTrustedDeviceList(): Promise&lt;Array&lt;DeviceInfo&gt;&gt;
- 示例:
```js
try {
dmInstance.getTrustedDeviceList().then((data) => {
console.log('get trusted device info: ' + JSON.stringify(data));
}).catch((err) => {
console.error("getTrustedDeviceList errCode:" + err.code + ",errMessage:" + err.message);
});
} catch (err) {
dmInstance.getTrustedDeviceList().then((data) => {
console.log('get trusted device info: ' + JSON.stringify(data));
}).catch((err) => {
console.error("getTrustedDeviceList errCode:" + err.code + ",errMessage:" + err.message);
}
});
```
### getLocalDeviceInfoSync<sup>8+</sup>
......@@ -371,15 +367,11 @@ getLocalDeviceInfo(): Promise&lt;DeviceInfo&gt;
- 示例:
```js
try {
dmInstance.getLocalDeviceInfo().then((data) => {
console.log('get local device info: ' + JSON.stringify(data));
}).catch((err) => {
console.error("getLocalDeviceInfo errCode:" + err.code + ",errMessage:" + err.message);
});
} catch (err) {
dmInstance.getLocalDeviceInfo().then((data) => {
console.log('get local device info: ' + JSON.stringify(data));
}).catch((err) => {
console.error("getLocalDeviceInfo errCode:" + err.code + ",errMessage:" + err.message);
}
});
```
### startDeviceDiscovery8+</sup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册