diff --git a/zh-cn/application-dev/reference/apis/js-apis-wifi.md b/zh-cn/application-dev/reference/apis/js-apis-wifi.md index c3b1746f3d5bb9a05e5e76b481f832c30bd6c6be..5713f2b4acc6f99fb376588333d6d54da789c815 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-wifi.md +++ b/zh-cn/application-dev/reference/apis/js-apis-wifi.md @@ -1644,7 +1644,7 @@ getP2pPeerDevices(callback: AsyncCallback<WifiP2pDevice[]>): void **示例:** ```js -import wifi from '@ohos.wifiManager'; +import wifi from '@ohos.wifi'; wifi.getP2pPeerDevices((err, data) => { if (err) { diff --git a/zh-cn/application-dev/reference/apis/js-apis-wifiManager.md b/zh-cn/application-dev/reference/apis/js-apis-wifiManager.md index a9ee02b0bc22c76d76ef5d084cbf206d0ede364d..dafa7c568c2caef4dad8607ba255e5ebac85710a 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-wifiManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-wifiManager.md @@ -2518,7 +2518,7 @@ p2pConnect(config: WifiP2PConfig): void var recvP2pPersistentGroupChangeFunc = () => { console.info("p2p persistent group change receive event"); - wifiManager.getCurrentGroup((err, data) => { + wifiManager.getCurrentP2pGroup((err, data) => { if (err) { console.error('failed to get current group: ' + JSON.stringify(err)); return;