diff --git a/zh-cn/application-dev/reference/apis/js-apis-hilog.md b/zh-cn/application-dev/reference/apis/js-apis-hilog.md index ad45774b8dce4261d453deb6642dc504b4e46fd2..31f387c5829e9b9b1ccd11402885dd1b704c981c 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-hilog.md +++ b/zh-cn/application-dev/reference/apis/js-apis-hilog.md @@ -1,7 +1,6 @@ # 日志打印 hilog日志系统,使应用/服务可以按照指定级别、标识和格式字符串输出日志内容,帮助开发者了解应用/服务的运行状态,更好地调试程序。 -以下文档仅对接口功能进行描述,具体的日志打印要求请参考[OpenHarmony日志打印规范](../../../contribute/OpenHarmony-Log-guide.md)。 > **说明:** > 本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-plainarray.md b/zh-cn/application-dev/reference/apis/js-apis-plainarray.md index 2a96f5917a46f4c7d3bc2d868ca1b70b8893ff1f..b6a81a607cb3aeacbd8b970e5349fd410a72a754 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-plainarray.md +++ b/zh-cn/application-dev/reference/apis/js-apis-plainarray.md @@ -153,7 +153,7 @@ getIndexOfKey(key: number): number let plainArray = new PlainArray(); plainArray.add(1, "sddfhf"); plainArray.add(2, "sffdfhf"); -let result = plainArray.getIndexOfKey("sdfs"); +let result = plainArray.getIndexOfKey(2); ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-radio.md b/zh-cn/application-dev/reference/apis/js-apis-radio.md index 08f4e9162bb6abdf29345c5a524b31c5d57d8926..3b60b6470b418fcb7e4f9d5132d9dbe0f300f478 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-radio.md +++ b/zh-cn/application-dev/reference/apis/js-apis-radio.md @@ -408,7 +408,7 @@ isNrSupported\(slotId: number\): boolean ```js let slotId = 0; let result = radio.isNrSupported(slotId); -console.log("result is "+ result); +console.log("Result: "+ result); ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-sim.md b/zh-cn/application-dev/reference/apis/js-apis-sim.md index 9d846f61af0484b8fcd159d016581c67a8d2c8ea..e538c3efd5a335919fecfaa0f8c0ab0a1f072bc6 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-sim.md +++ b/zh-cn/application-dev/reference/apis/js-apis-sim.md @@ -521,7 +521,7 @@ getMaxSimCount\(\): number **示例:** ```js -console.log("the result is "+sim.getMaxSimCount()) +console.log("Result: "+sim.getMaxSimCount()) ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-uri.md b/zh-cn/application-dev/reference/apis/js-apis-uri.md index e4d88846fbbced34b62e55081bf1ae966c13395b..6b2182c3af95ad7240f643a2d11e6526a823c695 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-uri.md +++ b/zh-cn/application-dev/reference/apis/js-apis-uri.md @@ -6,7 +6,7 @@ ## 导入模块 -``` +```js import uri from '@ohos.uri' ``` @@ -14,7 +14,7 @@ import uri from '@ohos.uri' ### 属性 -**系统能力:** 以下各项对应的系统能力均为SystemCapability.Utils.Lang +**系统能力:** SystemCapability.Utils.Lang | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | diff --git a/zh-cn/application-dev/reference/apis/js-apis-webSocket.md b/zh-cn/application-dev/reference/apis/js-apis-webSocket.md index e3ca0ee129fda98e87fc92322cc88677763dc6bd..01dc94b9859c4eeb9a834a8974e33a6fdcc8d450 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-webSocket.md +++ b/zh-cn/application-dev/reference/apis/js-apis-webSocket.md @@ -23,7 +23,7 @@ import webSocket from '@ohos.net.webSocket'; var defaultIpAddress = "ws://"; let ws = webSocket.createWebSocket(); ws.on('open', (err, value) => { - console.log("on open, status:" + value.status + ", message:" + value.message); + console.log("on open, status:" + value['status'] + ", message:" + value['message']); // 当收到on('open')事件时,可以通过send()方法与服务器进行通信 ws.send("Hello, server!", (err, value) => { if (!err) { @@ -47,7 +47,7 @@ ws.on('message', (err, value) => { } }); ws.on('close', (err, value) => { - console.log("on close, code is " + value.code + ", reason is " + value.reason); + console.log("on close, code is " + value['code'] + ", reason is " + value['reason']); }); ws.on('error', (err) => { console.log("on error, error:" + JSON.stringify(err)); @@ -393,7 +393,7 @@ on\(type: 'open', callback: AsyncCallback\): void ```js let ws = webSocket.createWebSocket(); ws.on('open', (err, value) => { - console.log("on open, status:" + value.status + ", message:" + value.message); + console.log("on open, status:" + value['status'] + ", message:" + value['message']); }); ``` @@ -421,7 +421,7 @@ off\(type: 'open', callback?: AsyncCallback\): void ```js let ws = webSocket.createWebSocket(); let callback1 = (err, value) => { - console.log("on open, status:" + value.status + ", message:" + value.message); + console.log("on open, status:" + value['status'] + ", message:" + value['message']); } ws.on('open', callback1); // 可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅 @@ -505,7 +505,7 @@ on\(type: 'close', callback: AsyncCallback<\{ code: number, reason: string \}\>\ ```js let ws = webSocket.createWebSocket(); ws.on('close', (err, value) => { - console.log("on close, code is " + value.code + ", reason is " + value.reason); + console.log("on close, code is " + value['code'] + ", reason is " + value['reason']); }); ```