From d8a597aac72f7ecc971c6850deae6cf97135a99f Mon Sep 17 00:00:00 2001 From: dongbinbin Date: Wed, 26 Jul 2023 14:54:14 +0800 Subject: [PATCH] Fix example code. Signed-off-by: dongbinbin --- .../reference/apis/js-apis-driver-deviceManager.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-driver-deviceManager.md b/zh-cn/application-dev/reference/apis/js-apis-driver-deviceManager.md index 1dfc7de837..003d0884bc 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-driver-deviceManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-driver-deviceManager.md @@ -82,7 +82,7 @@ bindDevice(deviceId: number, onDisconnect: AsyncCallback<number>, ```js try { - deviceManager.bindDevice(device.deviceId, (error, data) => { + deviceManager.bindDevice(12345678, (error, data) => { console.error('Device is disconnected'); }, (error, data) => { if (error) { @@ -131,7 +131,7 @@ bindDevice(deviceId: number, onDisconnect: AsyncCallback<number>): Promise ```js try { - deviceManager.bindDevice(matchDevice.deviceId, (error, data) => { + deviceManager.bindDevice(12345678, (error, data) => { console.error('Device is disconnected'); }).then(data => { console.info('bindDevice success'); @@ -169,7 +169,7 @@ unbindDevice(deviceId: number, callback: AsyncCallback<number>): void ```js try { - deviceManager.unbindDevice(matchDevice.deviceId, (error, data) => { + deviceManager.unbindDevice(12345678, (error, data) => { if (error) { console.error('unbindDevice async fail. Code is ${error.code}, message is ${error.message}'); return; @@ -211,7 +211,7 @@ unbindDevice(deviceId: number): Promise<number> ```js try { - deviceManager.unbindDevice(matchDevice.deviceId).then(data => { + deviceManager.unbindDevice(12345678).then(data => { console.info('unbindDevice success'); }, error => { console.error('unbindDevice async fail. Code is ${error.code}, message is ${error.message}'); -- GitLab