未验证 提交 6275baea 编写于 作者: O openharmony_ci 提交者: Gitee

!10096 整改readme

Merge pull request !10096 from dingxiaochen/master
...@@ -403,7 +403,7 @@ formatPhoneNumber\(phoneNumber: string, options: NumberFormatOptions, callback: ...@@ -403,7 +403,7 @@ formatPhoneNumber\(phoneNumber: string, options: NumberFormatOptions, callback:
**示例:** **示例:**
```js ```js
call.formatPhoneNumber("138xxxxxxxx",{ call.formatPhoneNumber("138xxxxxxxx", {
countryCode: "CN" countryCode: "CN"
}, (err, data) => { }, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
......
...@@ -689,7 +689,7 @@ promise.then(data => { ...@@ -689,7 +689,7 @@ promise.then(data => {
## sim.**setShowName**<sup>8+</sup> ## sim.**setShowName**<sup>8+</sup>
setShowName\(slotId: number, name: string,callback: AsyncCallback<void\>\): void setShowName\(slotId: number, name: string, callback: AsyncCallback<void\>\): void
设置指定卡槽SIM卡显示的名称。使用callback异步回调。 设置指定卡槽SIM卡显示的名称。使用callback异步回调。
...@@ -818,7 +818,7 @@ promise.then(data => { ...@@ -818,7 +818,7 @@ promise.then(data => {
## sim.**setShowNumber**<sup>8+</sup> ## sim.**setShowNumber**<sup>8+</sup>
setShowNumber\(slotId: number, number: string,callback: AsyncCallback<void\>\): void setShowNumber\(slotId: number, number: string, callback: AsyncCallback<void\>\): void
设置指定卡槽SIM卡的号码。使用callback异步回调。 设置指定卡槽SIM卡的号码。使用callback异步回调。
...@@ -848,7 +848,7 @@ sim.setShowNumber(0, number, (err, data) => { ...@@ -848,7 +848,7 @@ sim.setShowNumber(0, number, (err, data) => {
## sim.**setShowNumber**<sup>8+</sup> ## sim.**setShowNumber**<sup>8+</sup>
setShowNumber\(slotId: number,number: string\): Promise\<void\> setShowNumber\(slotId: number, number: string\): Promise\<void\>
设置指定卡槽SIM卡的号码。使用Promise异步回调。 设置指定卡槽SIM卡的号码。使用Promise异步回调。
...@@ -885,7 +885,7 @@ promise.then(data => { ...@@ -885,7 +885,7 @@ promise.then(data => {
## sim.**getShowNumber**<sup>8+</sup> ## sim.**getShowNumber**<sup>8+</sup>
getShowNumber(slotId: number,callback: AsyncCallback<string\>): void getShowNumber(slotId: number, callback: AsyncCallback<string\>): void
获取指定卡槽SIM卡的号码。使用callback异步回调。 获取指定卡槽SIM卡的号码。使用callback异步回调。
...@@ -1344,7 +1344,7 @@ promise.then(data => { ...@@ -1344,7 +1344,7 @@ promise.then(data => {
## sim.**unlockPin**<sup>7+</sup> ## sim.**unlockPin**<sup>7+</sup>
unlockPin(slotId: number,pin: string ,callback: AsyncCallback<LockStatusResponse\>): void unlockPin(slotId: number, pin: string, callback: AsyncCallback<LockStatusResponse\>): void
解锁指定卡槽SIM卡密码。使用callback异步回调。 解锁指定卡槽SIM卡密码。使用callback异步回调。
...@@ -1374,7 +1374,7 @@ sim.unlockPin(0, pin, (err, data) => { ...@@ -1374,7 +1374,7 @@ sim.unlockPin(0, pin, (err, data) => {
## sim.**unlockPin**<sup>7+</sup> ## sim.**unlockPin**<sup>7+</sup>
unlockPin(slotId: number,pin: string): Promise&lt;LockStatusResponse\> unlockPin(slotId: number, pin: string): Promise&lt;LockStatusResponse\>
解锁指定卡槽SIM卡密码。使用Promise异步回调。 解锁指定卡槽SIM卡密码。使用Promise异步回调。
...@@ -1411,7 +1411,7 @@ promise.then(data => { ...@@ -1411,7 +1411,7 @@ promise.then(data => {
## sim.**unlockPuk**<sup>7+</sup> ## sim.**unlockPuk**<sup>7+</sup>
unlockPuk(slotId: number,newPin: string,puk: string ,callback: AsyncCallback<LockStatusResponse\>): void unlockPuk(slotId: number, newPin: string, puk: string, callback: AsyncCallback<LockStatusResponse\>): void
解锁指定卡槽SIM卡密码的解锁密码。使用callback异步回调。 解锁指定卡槽SIM卡密码的解锁密码。使用callback异步回调。
...@@ -1443,7 +1443,7 @@ sim.unlockPuk(0, newPin, puk, (err, data) => { ...@@ -1443,7 +1443,7 @@ sim.unlockPuk(0, newPin, puk, (err, data) => {
## sim.**unlockPuk**<sup>7+</sup> ## sim.**unlockPuk**<sup>7+</sup>
unlockPuk(slotId: number,newPin: string,puk: string): Promise&lt;LockStatusResponse\> unlockPuk(slotId: number, newPin: string, puk: string): Promise&lt;LockStatusResponse\>
解锁指定卡槽SIM卡密码的解锁密码。使用Promise异步回调。 解锁指定卡槽SIM卡密码的解锁密码。使用Promise异步回调。
...@@ -1482,7 +1482,7 @@ promise.then(data => { ...@@ -1482,7 +1482,7 @@ promise.then(data => {
## sim.**unlockPin**2<sup>8+</sup> ## sim.**unlockPin**2<sup>8+</sup>
unlockPin2(slotId: number,pin2: string ,callback: AsyncCallback<LockStatusResponse\>): void unlockPin2(slotId: number, pin2: string, callback: AsyncCallback<LockStatusResponse\>): void
解锁指定卡槽SIM卡密码。使用callback异步回调。 解锁指定卡槽SIM卡密码。使用callback异步回调。
...@@ -1512,7 +1512,7 @@ sim.unlockPin2(0, pin2, (err, data) => { ...@@ -1512,7 +1512,7 @@ sim.unlockPin2(0, pin2, (err, data) => {
## sim.**unlockPin**2<sup>8+</sup> ## sim.**unlockPin**2<sup>8+</sup>
unlockPin2(slotId: number,pin2: string): Promise&lt;LockStatusResponse\> unlockPin2(slotId: number, pin2: string): Promise&lt;LockStatusResponse\>
解锁指定卡槽SIM卡密码。使用Promise异步回调。 解锁指定卡槽SIM卡密码。使用Promise异步回调。
...@@ -1539,7 +1539,7 @@ unlockPin2(slotId: number,pin2: string): Promise&lt;LockStatusResponse\> ...@@ -1539,7 +1539,7 @@ unlockPin2(slotId: number,pin2: string): Promise&lt;LockStatusResponse\>
```js ```js
let pin2='1234'; let pin2='1234';
let promise = sim.unlockPin2(0,pin2); let promise = sim.unlockPin2(0, pin2);
promise.then(data => { promise.then(data => {
console.log(`unlockPin2 success, promise: data->${JSON.stringify(data)}`); console.log(`unlockPin2 success, promise: data->${JSON.stringify(data)}`);
}).catch(err => { }).catch(err => {
...@@ -1851,7 +1851,7 @@ setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string, callback: ...@@ -1851,7 +1851,7 @@ setVoiceMailInfo(slotId: number, mailName: string, mailNumber: string, callback:
**示例:** **示例:**
```js ```js
sim.setVoiceMailInfo(0, "mail", "xxx@xxx.com" , (err, data) => { sim.setVoiceMailInfo(0, "mail", "xxx@xxx.com", (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
......
...@@ -160,7 +160,7 @@ promise.then(data => { ...@@ -160,7 +160,7 @@ promise.then(data => {
## sms.setDefaultSmsSlotId<sup>7+</sup> ## sms.setDefaultSmsSlotId<sup>7+</sup>
setDefaultSmsSlotId\(slotId: number,callback: AsyncCallback&lt;void&gt;\): void setDefaultSmsSlotId\(slotId: number, callback: AsyncCallback&lt;void&gt;\): void
设置发送短信的默认SIM卡槽ID。使用callback异步回调。 设置发送短信的默认SIM卡槽ID。使用callback异步回调。
...@@ -180,7 +180,7 @@ setDefaultSmsSlotId\(slotId: number,callback: AsyncCallback&lt;void&gt;\): void ...@@ -180,7 +180,7 @@ setDefaultSmsSlotId\(slotId: number,callback: AsyncCallback&lt;void&gt;\): void
**示例:** **示例:**
```js ```js
sms.setDefaultSmsSlotId(0,(err, data) => { sms.setDefaultSmsSlotId(0, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
......
...@@ -87,7 +87,7 @@ console.log("Result: "+ data.getDefaultCellularDataSlotIdSync()) ...@@ -87,7 +87,7 @@ console.log("Result: "+ data.getDefaultCellularDataSlotIdSync())
## data.setDefaultCellularDataSlotId ## data.setDefaultCellularDataSlotId
setDefaultCellularDataSlotId(slotId: number,callback: AsyncCallback\<void\>): void setDefaultCellularDataSlotId(slotId: number, callback: AsyncCallback\<void\>): void
设置默认移动数据的SIM卡,使用callback方式作为异步方法。 设置默认移动数据的SIM卡,使用callback方式作为异步方法。
...@@ -107,7 +107,7 @@ setDefaultCellularDataSlotId(slotId: number,callback: AsyncCallback\<void\>): vo ...@@ -107,7 +107,7 @@ setDefaultCellularDataSlotId(slotId: number,callback: AsyncCallback\<void\>): vo
**示例:** **示例:**
```js ```js
data.setDefaultCellularDataSlotId(0,(err, data) => { data.setDefaultCellularDataSlotId(0, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
...@@ -312,7 +312,7 @@ isCellularDataRoamingEnabled(slotId: number, callback: AsyncCallback\<boolean\>) ...@@ -312,7 +312,7 @@ isCellularDataRoamingEnabled(slotId: number, callback: AsyncCallback\<boolean\>)
**示例:** **示例:**
```js ```js
data.isCellularDataRoamingEnabled(0,(err, data) => { data.isCellularDataRoamingEnabled(0, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}); });
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册