diff --git a/zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md b/zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md index 8fcb75209c766a0ca3b7ab20868b1ba4de9dec2a..982f8ac0517be4ed950af8dd73504753a582ac3d 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md +++ b/zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md @@ -114,9 +114,9 @@ ethernet.setIfaceConfig("eth0", { dnsServers: "1.1.1.1", domain: "2.2.2.2" }).then(() => { - console.log("setIfaceConfig promiss ok "); + console.log("setIfaceConfig promise ok "); }).catch(error => { - console.log("setIfaceConfig promiss error = " + JSON.stringify(error)); + console.log("setIfaceConfig promise error = " + JSON.stringify(error)); }); ``` @@ -207,15 +207,15 @@ getIfaceConfig(iface: string): Promise\ ```js ethernet.getIfaceConfig("eth0").then((data) => { - console.log("getIfaceConfig promiss mode = " + JSON.stringify(data.mode)); - console.log("getIfaceConfig promiss ipAddr = " + JSON.stringify(data.ipAddr)); - console.log("getIfaceConfig promiss route = " + JSON.stringify(data.route)); - console.log("getIfaceConfig promiss gateway = " + JSON.stringify(data.gateway)); - console.log("getIfaceConfig promiss netMask = " + JSON.stringify(data.netMask)); - console.log("getIfaceConfig promiss dnsServers = " + JSON.stringify(data.dnsServers)); - console.log("getIfaceConfig promiss domain = " + JSON.stringify(data.domain)); + console.log("getIfaceConfig promise mode = " + JSON.stringify(data.mode)); + console.log("getIfaceConfig promise ipAddr = " + JSON.stringify(data.ipAddr)); + console.log("getIfaceConfig promise route = " + JSON.stringify(data.route)); + console.log("getIfaceConfig promise gateway = " + JSON.stringify(data.gateway)); + console.log("getIfaceConfig promise netMask = " + JSON.stringify(data.netMask)); + console.log("getIfaceConfig promise dnsServers = " + JSON.stringify(data.dnsServers)); + console.log("getIfaceConfig promise domain = " + JSON.stringify(data.domain)); }).catch(error => { - console.log("getIfaceConfig promiss error = " + JSON.stringify(error)); + console.log("getIfaceConfig promise error = " + JSON.stringify(error)); }); ``` @@ -300,9 +300,9 @@ isIfaceActive(iface: string): Promise\ ```js ethernet.isIfaceActive("eth0").then((data) => { - console.log("isIfaceActive promiss = " + JSON.stringify(data)); + console.log("isIfaceActive promise = " + JSON.stringify(data)); }).catch(error => { - console.log("isIfaceActive promiss error = " + JSON.stringify(error)); + console.log("isIfaceActive promise error = " + JSON.stringify(error)); }); ``` @@ -377,12 +377,12 @@ getAllActiveIfaces(): Promise\> ```js ethernet.getAllActiveIfaces().then((data) => { - console.log("getAllActiveIfaces promiss data.length = " + JSON.stringify(data.length)); + console.log("getAllActiveIfaces promise data.length = " + JSON.stringify(data.length)); for (let i = 0; i < data.length; i++) { - console.log("getAllActiveIfaces promiss = " + JSON.stringify(data[i])); + console.log("getAllActiveIfaces promise = " + JSON.stringify(data[i])); } }).catch(error => { - console.log("getAllActiveIfaces promiss error = " + JSON.stringify(error)); + console.log("getAllActiveIfaces promise error = " + JSON.stringify(error)); }); ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-fetch.md b/zh-cn/application-dev/reference/apis/js-apis-system-fetch.md index a3c71e776adc301450ed12afe4427a528a0fc86b..b4e7eb8eccbab3614d8182eb6492a9a9ce189d48 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-system-fetch.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-fetch.md @@ -23,7 +23,7 @@ fetch(Object): void **系统能力:** SystemCapability.Communication.NetStack **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | url | string | 是 | 资源地址。 | | data | string \| Object | 否 | 请求的参数,可选类型是字符串或者json对象。详见表 data与Content-Type关系。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-network.md b/zh-cn/application-dev/reference/apis/js-apis-system-network.md index 2008c020907e73b5c05423145edf06e4fb6aea4d..85e7aa74af1e2d315ba9d602d61528d2a1a4caa6 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-system-network.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-network.md @@ -31,7 +31,7 @@ getType(Object): void **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | success | Function | 否 | 接口调用成功的回调函数,返回值为[NetworkResponse](#networkresponse) | | fail | Function | 否 | 接口调用失败的回调函数。 | @@ -71,7 +71,7 @@ subscribe(Object): void **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | success | Function | 否 | 网络发生变化的回调函数,返回值为[NetworkResponse](#networkresponse) | | fail | Function | 否 | 接口调用失败的回调函数。 | 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 b73344ad3ad60ecd0cc36dcec11c15cdd14c2b96..9853827f5e3a37af24b76d19c8c0e982dfcc5b93 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-webSocket.md +++ b/zh-cn/application-dev/reference/apis/js-apis-webSocket.md @@ -99,7 +99,7 @@ connect(url: string, callback: AsyncCallback\): void **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------ | ---- | ---------------------------- | | url | string | 是 | 建立WebSocket连接的URL地址。 | | callback | AsyncCallback\ | 是 | 回调函数。 | @@ -138,7 +138,7 @@ connect(url: string, options: WebSocketRequestOptions, callback: AsyncCallback\< **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------ | ---- | ------------------------------------------------------- | | url | string | 是 | 建立WebSocket连接的URL地址。 | | options | WebSocketRequestOptions | 是 | 参考[WebSocketRequestOptions](#websocketrequestoptions)。 | @@ -183,7 +183,7 @@ connect(url: string, options?: WebSocketRequestOptions): Promise\ **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | ------- | ----------------------- | ---- | ------------------------------------------------------- | | url | string | 是 | 建立WebSocket连接的URL地址。 | | options | WebSocketRequestOptions | 否 | 参考[WebSocketRequestOptions](#websocketrequestoptions)。 | @@ -227,7 +227,7 @@ send(data: string | ArrayBuffer, callback: AsyncCallback\): void **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------ | ---- | ------------ | | data | string \| ArrayBuffer | 是 | 发送的数据。
API 6及更早版本仅支持string类型。API 8起同时支持string和ArrayBuffer类型。 | | callback | AsyncCallback\ | 是 | 回调函数。 | @@ -268,7 +268,7 @@ send(data: string | ArrayBuffer): Promise\ **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | ------ | ------ | ---- | ------------ | | data | string \| ArrayBuffer | 是 | 发送的数据。
API 6及更早版本仅支持string类型。API 8起同时支持string和ArrayBuffer类型。 | @@ -313,7 +313,7 @@ close(callback: AsyncCallback\): void **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------ | ---- | ---------- | | callback | AsyncCallback\ | 是 | 回调函数。 | @@ -351,7 +351,7 @@ close(options: WebSocketCloseOptions, callback: AsyncCallback\): void **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------ | ---- | ----------------------------------------------------- | | options | WebSocketCloseOptions | 是 | 参考[WebSocketCloseOptions](#websocketcloseoptions)。 | | callback | AsyncCallback\ | 是 | 回调函数。 | @@ -393,7 +393,7 @@ close(options?: WebSocketCloseOptions): Promise\ **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | ------- | --------------------- | ---- | ----------------------------------------------------- | | options | WebSocketCloseOptions | 否 | 参考[WebSocketCloseOptions](#websocketcloseoptions)。 | @@ -437,7 +437,7 @@ on(type: 'open', callback: AsyncCallback\): void **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------- | ---- | ----------------------------- | | type | string | 是 | 'open':WebSocket的打开事件。 | | callback | AsyncCallback\ | 是 | 回调函数。 | @@ -466,7 +466,7 @@ off(type: 'open', callback?: AsyncCallback\): void **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------- | ---- | ----------------------------- | | type | string | 是 | 'open':WebSocket的打开事件。 | | callback | AsyncCallback\ | 否 | 回调函数。 | @@ -497,7 +497,7 @@ on(type: 'message', callback: AsyncCallback\): void **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------- | ---- | -------------------------------------------- | | type | string | 是 | 'message':WebSocket的接收到服务器消息事件。 | | callback | AsyncCallback\8+\> | 是 | 回调函数。 | @@ -526,7 +526,7 @@ off(type: 'message', callback?: AsyncCallback\): void **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | --------------------------------------------------- | ---- | -------------------------------------------- | | type | string | 是 | 'message':WebSocket的接收到服务器消息事件。 | | callback | AsyncCallback\8+\> | 否 | 回调函数。 | @@ -549,7 +549,7 @@ on(type: 'close', callback: AsyncCallback\<{ code: number, reason: string }\>): **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------------------------------- | ---- | ------------------------------ | | type | string | 是 | 'close':WebSocket的关闭事件。 | | callback | AsyncCallback\<{ code: number, reason: string }\> | 是 | 回调函数。
close:close错误码,reason:错误码说明 | @@ -577,7 +577,7 @@ off(type: 'close', callback?: AsyncCallback\<{ code: number, reason: string }\>) **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------------------------------- | ---- | ------------------------------ | | type | string | 是 | 'close':WebSocket的关闭事件。 | | callback | AsyncCallback\<{ code: number, reason: string }\> | 否 | 回调函数。
close:close错误码,reason:错误码说明 | @@ -600,7 +600,7 @@ on(type: 'error', callback: ErrorCallback): void **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | ------------- | ---- | ------------------------------- | | type | string | 是 | 'error':WebSocket的Error事件。 | | callback | ErrorCallback | 是 | 回调函数。 | @@ -628,7 +628,7 @@ off(type: 'error', callback?: ErrorCallback): void **参数:** -| 名称 | 类型 | 必填 | 说明 | +| 参数名 | 类型 | 必填 | 说明 | | -------- | ------------- | ---- | ------------------------------- | | type | string | 是 | 'error':WebSocket的Error事件。 | | callback | ErrorCallback | 否 | 回调函数。 |