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

!9602 md文件扫描问题修改

Merge pull request !9602 from dingxiaochen/master
......@@ -319,7 +319,7 @@ isEmergencyPhoneNumber\(phoneNumber: string, options: EmergencyNumberOptions, ca
**示例:**
```js
call.isEmergencyPhoneNumber("112", {slotId: 1}, (err, value) => {
call.isEmergencyPhoneNumber("112", {slotId: 1}, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......@@ -468,9 +468,7 @@ formatPhoneNumberToE164\(phoneNumber: string, countryCode: string, callback: Asy
**示例:**
```js
call.formatPhoneNumberToE164("138xxxxxxxx",{
countryCode: "CN"
}, (err, data) => {
call.formatPhoneNumberToE164("138xxxxxxxx", "CN", (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......@@ -504,9 +502,7 @@ formatPhoneNumberToE164\(phoneNumber: string, countryCode: string\): Promise<str
**示例:**
```js
let promise = call.formatPhoneNumberToE164("138xxxxxxxx", {
countryCode: "CN"
});
let promise = call.formatPhoneNumberToE164("138xxxxxxxx", "CN");
promise.then(data => {
console.log(`formatPhoneNumberToE164 success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
......@@ -1703,7 +1699,7 @@ on\(type: 'mmiCodeResult', callback: Callback<MmiCodeResults\>\): void
**示例:**
```js
isNewCallAllowedcall.on('mmiCodeResult', (err, data) => {
call.on('mmiCodeResult', (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......@@ -2072,10 +2068,7 @@ getCallTransferInfo\(slotId: number, type: CallTransferType, callback: AsyncCall
**示例:**
```js
let callTransferTyp={
CallTransferType: 1
}
call.getCallTransferInfo(0, callTransferTyp, (err, data) => {
call.getCallTransferInfo(0, call.CallTransferType.TRANSFER_TYPE_BUSY, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......@@ -2107,10 +2100,7 @@ getCallTransferInfo\(slotId: number, type: CallTransferType): Promise<CallTransf
**示例:**
```js
let callTransferTyp={
CallTransferType: 1
}
let promise = call.getCallTransferInfo(0, callTransferTyp);
let promise = call.getCallTransferInfo(0, call.CallTransferType.TRANSFER_TYPE_BUSY);
promise.then(data => {
console.log(`getCallTransferInfo success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
......@@ -2399,7 +2389,7 @@ setAudioDevice\(device: AudioDevice, options: AudioDeviceOptions, callback: Asyn
let audioDeviceOptions={
bluetoothAddress: "IEEE 802-2014"
}
call.setAudioDevice(1, bluetoothAddress, (err, value) => {
call.setAudioDevice(1, audioDeviceOptions, (err, value) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......@@ -2463,7 +2453,10 @@ joinConference(mainCallId: number, callNumberList: Array<string\>, callback: Asy
**示例:**
```js
call.joinConference(1, "138XXXXXXXX", (err, data) => {
let callNumberList: Array<string> = [
"138XXXXXXXX"
];
call.joinConference(1, callNumberList, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......@@ -2494,7 +2487,10 @@ joinConference(mainCallId: number, callNumberList: Array<string\>): Promise<void
**示例:**
```js
let promise = call.joinConference(1, "138XXXXXXXX");
let callNumberList: Array<string> = [
"138XXXXXXXX"
];
let promise = call.joinConference(1, callNumberList);
promise.then(data => {
console.log(`joinConference success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
......
......@@ -34,7 +34,7 @@ addContact(contact:Contact, callback:AsyncCallback&lt;number&gt;): void
```js
contact.addContact({
fullName: {fullName: 'xxx'},
name: {fullName: 'xxx'},
phoneNumbers: [{phoneNumber: '138xxxxxxxx'}]
}, (err, data) => {
if (err) {
......@@ -202,7 +202,7 @@ updateContact(contact: Contact, attrs: ContactAttributes, callback: AsyncCallbac
```js
contact.updateContact({
fullName: {fullName: 'xxx'},
name: {fullName: 'xxx'},
phoneNumbers: [{phoneNumber: '138xxxxxxxx'}]
},{
attributes:[contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME]
......@@ -242,7 +242,7 @@ updateContact(contact: Contact, attrs?: ContactAttributes): Promise&lt;void&gt;
```js
let promise = contact.updateContact({
fullName: {fullName: 'xxx'},
name: {fullName: 'xxx'},
phoneNumbers: [{phoneNumber: '138xxxxxxxx'}]
}, {
attributes: [contact.Attribute.ATTR_EMAIL, contact.Attribute.ATTR_NAME]
......@@ -487,7 +487,7 @@ selectContact(callback: AsyncCallback&lt;Array&lt;Contact&gt;&gt;): void
**需要权限**:ohos.permission.READ_CONTACTS
**系统能力**:SystemCapability.Applications.Contacts、SystemCapability.Applications.ContactsData
**系统能力**:SystemCapability.Applications.ContactsData
**参数:**
......@@ -1450,7 +1450,7 @@ queryKey(id: number, holder: Holder, callback: AsyncCallback&lt;string&gt;): voi
**示例:**
```js
contact.queryKey(id, {
contact.queryKey(/*id*/1, {
holderId: 0,
bundleName: "",
displayName: ""
......@@ -1490,7 +1490,7 @@ queryKey(id: number, holder?: Holder): Promise&lt;string&gt;
**示例:**
```js
let promise = contact.queryKey(id, {
let promise = contact.queryKey(/*id*/1, {
holderId: 0,
bundleName: "",
displayName: ""
......@@ -1605,7 +1605,7 @@ let contactAttributes = {
```js
let contactAttributes = new contact.ContactAttributes();
contactAttributes.attributes = ["ATTR_EMAIL"];
contactAttributes.attributes = [contact.Attribute.ATTR_EMAIL];
```
......
......@@ -1100,12 +1100,12 @@ setNetworkSelectionMode\(options: NetworkSelectionModeOptions, callback: AsyncCa
let networkInformation={
operatorName: "中国移动",
operatorNumeric: "898600",
state: 1,
state: radio.NetworkInformationState.NETWORK_AVAILABLE,
radioTech: "CS"
}
let networkSelectionModeOptions={
slotid: 0,
selectMode: 1,
slotId: 0,
selectMode: radio.NetworkSelectionMode.NETWORK_SELECTION_AUTOMATIC,
networkInformation: networkInformation,
resumeSelection: true
}
......@@ -1144,12 +1144,12 @@ setNetworkSelectionMode\(options: NetworkSelectionModeOptions\): Promise<void\>
let networkInformation={
operatorName: "中国移动",
operatorNumeric: "898600",
state: 1,
state: radio.NetworkInformationState.NETWORK_AVAILABLE,
radioTech: "CS"
}
let networkSelectionModeOptions={
slotid: 0,
selectMode: 1,
slotId: 0,
selectMode: radio.NetworkSelectionMode.NETWORK_SELECTION_AUTOMATIC,
networkInformation: networkInformation,
resumeSelection: true
}
......@@ -1190,7 +1190,7 @@ radio.getNetworkSearchInformation(0, (err, data) => {
## radio.getNetworkSearchInformation
getNetworkSearchInformation\(slotId: number\): Promise<void\>
getNetworkSearchInformation\(slotId: number\): Promise<NetworkSearchResult\>
获取网络搜索信息。使用Promise异步回调。
......@@ -1586,7 +1586,7 @@ radio.getPreferredNetwork(0, (err, data) => {
## radio.getPreferredNetwork<sup>8+</sup>
getPreferredNetwork(slotId: number): Promise<void\>
getPreferredNetwork(slotId: number): Promise<PreferredNetworkMode\>
获取首选网络。使用Promise异步回调。
......@@ -1642,7 +1642,7 @@ getImsRegInfo(slotId: number, imsType: ImsServiceType, callback: AsyncCallback<I
**示例:**
```js
radio.getImsRegInfo(0, 1, (err, data) => {
radio.getImsRegInfo(0, radio.ImsServiceType.TYPE_VIDEO, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......@@ -1675,7 +1675,7 @@ getImsRegInfo(slotId: number, imsType: ImsServiceType): Promise<ImsRegInfo\>
**示例:**
```js
let promise = radio.getImsRegInfo(0, 1);
let promise = radio.getImsRegInfo(0, radio.ImsServiceType.TYPE_VIDEO);
promise.then(data => {
console.log(`getImsRegInfo success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
......@@ -1707,7 +1707,7 @@ on(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback:
**示例:**
```js
radio.on('imsRegStateChange', 0, 1, (err, data) => {
radio.on('imsRegStateChange', 0, radio.ImsServiceType.TYPE_VIDEO, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......@@ -1736,7 +1736,7 @@ off(type: 'imsRegStateChange', slotId: number, imsType: ImsServiceType, callback
**示例:**
```js
radio.off('imsRegStateChange', 0, 1, (err, data) => {
radio.off('imsRegStateChange', 0, radio.ImsServiceType.TYPE_VIDEO, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......
......@@ -589,7 +589,7 @@ getActiveSimAccountInfoList(callback: AsyncCallback<Array<IccAccountInfo\>>): vo
**示例:**
```js
sim.getActiveSimAccountInfoList(0, (err, data) => {
sim.getActiveSimAccountInfoList((err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......@@ -710,7 +710,7 @@ setShowName\(slotId: number, name: string,callback: AsyncCallback<void\>\): void
**示例:**
```js
const name = '中国移动';
let name = '中国移动';
sim.setShowName(0, name, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
......@@ -744,7 +744,7 @@ setShowName\(slotId: number, name: string\): Promise\<void\>
**示例:**
```js
const name = '中国移动';
let name = '中国移动';
let promise = sim.setShowName(0, name);
promise.then(data => {
console.log(`setShowName success, promise: data->${JSON.stringify(data)}`);
......@@ -1096,9 +1096,9 @@ setLockState(slotId: number, options: LockInfo, callback: AsyncCallback<LockStat
```js
let lockInfo = {
lockType = 1,
lockType: sim.LockType.PIN_LOCK,
password = "1234",
state = 0
state: sim.LockState.LOCK_OFF
};
sim.setLockState(0, lockInfo, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
......@@ -1135,9 +1135,9 @@ setLockState(slotId: number, options: LockInfo): Promise<LockStatusResponse\>
```js
let lockInfo = {
lockType = 1,
lockType: sim.LockType.PIN_LOCK,
password = "1234",
state = 0
state: sim.LockState.LOCK_OFF
};
let promise = sim.setLockState(0, lockInfo);
promise.then(data => {
......@@ -2236,12 +2236,12 @@ addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
```js
let diallingNumbersInof = {
alphaTag = "alpha",
number = "138xxxxxxxx",
recordNumber = 123,
pin2 = "1234"
alphaTag: "alpha",
number: "138xxxxxxxx",
recordNumber: 123,
pin2: "1234"
};
sim.addIccDiallingNumbers(0, 1, diallingNumbersInof, (err, data) => {
sim.addIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......@@ -2277,12 +2277,12 @@ addIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
```js
let diallingNumbersInof = {
alphaTag = "alpha",
number = "138xxxxxxxx",
recordNumber = 123,
pin2 = "1234"
alphaTag: "alpha",
number: "138xxxxxxxx",
recordNumber: 123,
pin2: "1234"
};
let promise = sim.addIccDiallingNumbers(0, 1, diallingNumbersInof);
let promise = sim.addIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof);
promise.then(data => {
console.log(`addIccDiallingNumbers success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
......@@ -2315,12 +2315,12 @@ delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
```js
let diallingNumbersInof = {
alphaTag = "alpha",
number = "138xxxxxxxx",
recordNumber = 123,
pin2 = "1234"
alphaTag: "alpha",
number: "138xxxxxxxx",
recordNumber: 123,
pin2: "1234"
};
sim.delIccDiallingNumbers(0, 1, diallingNumbersInof, (err, data) => {
sim.delIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......@@ -2356,12 +2356,12 @@ delIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dialli
```js
let diallingNumbersInof = {
alphaTag = "alpha",
number = "138xxxxxxxx",
recordNumber = 123,
pin2 = "1234"
alphaTag: "alpha",
number: "138xxxxxxxx",
recordNumber: 123,
pin2: "1234"
};
let promise = sim.delIccDiallingNumbers(0, 1, diallingNumbersInof);
let promise = sim.delIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof);
promise.then(data => {
console.log(`delIccDiallingNumbers success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
......@@ -2394,12 +2394,12 @@ updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dia
```js
let diallingNumbersInof = {
alphaTag = "alpha",
number = "138xxxxxxxx",
recordNumber = 123,
pin2 = "1234"
alphaTag: "alpha",
number: "138xxxxxxxx",
recordNumber: 123,
pin2: "1234"
};
sim.updateIccDiallingNumbers(0, 1, diallingNumbersInof, (err, data) => {
sim.updateIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......@@ -2435,12 +2435,12 @@ updateIccDiallingNumbers(slotId: number, type: ContactType, diallingNumbers: Dia
```js
let diallingNumbersInof = {
alphaTag = "alpha",
number = "138xxxxxxxx",
recordNumber = 123,
pin2 = "1234"
alphaTag: "alpha",
number: "138xxxxxxxx",
recordNumber: 123,
pin2: "1234"
};
let promise = sim.updateIccDiallingNumbers(0, 1, diallingNumbersInof);
let promise = sim.updateIccDiallingNumbers(0, sim.ContactType.GENERAL_CONTACT, diallingNumbersInof);
promise.then(data => {
console.log(`updateIccDiallingNumbers success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
......@@ -2602,7 +2602,7 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo, callback: AsyncCallback<L
```js
let persoLockInfo = {
lockType = 0,
lockType = sim.PersoLockType.PN_PIN_LOCK,
password = "1234"
};
sim.unlockSimLock(0, persoLockInfo, (err, data) => {
......@@ -2640,7 +2640,7 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo): Promise<LockStatusRespon
```js
let persoLockInfo = {
lockType = 0,
lockType = sim.PersoLockType.PN_PIN_LOCK,
password = "1234"
};
let promise = sim.unlockSimLock(0, persoLockInfo);
......
......@@ -397,7 +397,7 @@ splitMessage(content: string, callback: AsyncCallback<Array<string\>>): void
**示例:**
```js
string content= "long message";
let content = "long message";
sms.splitMessage(content, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
......@@ -431,7 +431,7 @@ splitMessage(content: string): Promise<Array<string\>>
**示例:**
```js
string content = "long message";
let content = "long message";
let promise = sms.splitMessage(content);
promise.then(data => {
console.log(`splitMessage success, promise: data->${JSON.stringify(data)}`);
......@@ -463,10 +463,10 @@ addSimMessage(options: SimMessageOptions, callback: AsyncCallback<void\>): void
```js
let simMessageOptions = {
slotId = 0,
smsc = "test",
pdu = "xxxxxx",
status = 0
slotId: 0,
smsc: "test",
pdu: "xxxxxx",
status: sms.SimMessageStatus.SIM_MESSAGE_STATUS_READ
};
sms.addSimMessage(simMessageOptions, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
......@@ -502,10 +502,10 @@ addSimMessage(options: SimMessageOptions): Promise<void\>
```js
let simMessageOptions = {
slotId = 0,
smsc = "test",
pdu = "xxxxxx",
status = 0
slotId: 0,
smsc: "test",
pdu: "xxxxxx",
status: sms.SimMessageStatus.SIM_MESSAGE_STATUS_READ
};
let promise = sms.addSimMessage(simMessageOptions);
promise.then(data => {
......@@ -607,9 +607,9 @@ updateSimMessage(options: UpdateSimMessageOptions, callback: AsyncCallback<void\
```js
let updateSimMessageOptions = {
slotId = 0,
msgIndex = 1,
newStatus = 0,
slotId: 0,
msgIndex: 1,
newStatus: sms.SimMessageStatus.SIM_MESSAGE_STATUS_FREE,
pdu = "xxxxxxx",
smsc = "test"
};
......@@ -647,9 +647,9 @@ updateSimMessage(options: UpdateSimMessageOptions): Promise<void\>
```js
let updateSimMessageOptions = {
slotId = 0,
msgIndex = 1,
newStatus = 0,
slotId: 0,
msgIndex: 1,
newStatus: sms.SimMessageStatus.SIM_MESSAGE_STATUS_FREE,
pdu = "xxxxxxx",
smsc = "test"
};
......@@ -749,10 +749,11 @@ setCBConfig(options: CBConfigOptions, callback: AsyncCallback<void\>): void
```js
let cbConfigOptions = {
slotId = 0,
smsc = "test",
pdu = "xxxxxxxx",
status = 0
slotId: 0,
enable: true,
startMessageId: 100,
endMessageId: 200,
ranType: sms.RanType.TYPE_GSM
};
sms.setCBConfig(cbConfigOptions, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
......@@ -788,13 +789,14 @@ setCBConfig(options: CBConfigOptions): Promise<void\>
```js
let cbConfigOptions = {
slotId = 0,
smsc = "test",
pdu = "xxxxxxxx",
status = 0
slotId: 0,
enable: true,
startMessageId: 100,
endMessageId: 200,
ranType: sms.RanType.TYPE_GSM
};
let promise = sms.setCBConfig(cbConfigOptions);
promise.then(data =>
promise.then(data => {
console.log(`setCBConfig success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`setCBConfig failed, promise: err->${JSON.stringify(err)}`);
......@@ -859,7 +861,7 @@ getSmsSegmentsInfo(slotId: number, message: string, force7bit: boolean): Promise
```js
let slotId = 0;
let promise = sms.getSmsSegmentsInfo(slotId, "message", false);
promise.then(data =>
promise.then(data => {
console.log(`getSmsSegmentsInfo success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
console.error(`getSmsSegmentsInfo failed, promise: err->${JSON.stringify(err)}`);
......@@ -886,7 +888,7 @@ isImsSmsSupported(callback: AsyncCallback<boolean\>): void
```js
sms.isImsSmsSupported((err, data) => {
console.log(`callback: err->${JSON.(err)}, data->${JSON.stringify(data)}`);
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
});
```
......@@ -1023,7 +1025,7 @@ decodeMms(mmsFilePathName: string | Array<number\>): Promise<MmsInformation\>
```js
let mmsFilePathName = "filename";
let promise = sms.getSmscAddr(mmsFilePathName);
let promise = sms.decodeMms(mmsFilePathName);
promise.then(data => {
console.log(`decodeMms success, promise: data->${JSON.stringify(data)}`);
}).catch(err => {
......@@ -1092,13 +1094,13 @@ encodeMms(mms: MmsInformation): Promise<Array<number\>>
```js
let mmsAcknowledgeInd = {
transactionId = "100",
version = 0x10,
reportAllowed = 128
transactionId: "100",
version: sms.MmsVersionType.MMS_VERSION_1_0,
reportAllowed = sms.ReportType.MMS_YES
};
let mmsInformation = {
messageType = 133,
mmsType = mmsAcknowledgeInd
messageType: sms.MessageType.TYPE_MMS_ACKNOWLEDGE_IND,
mmsType: mmsAcknowledgeInd
};
let promise = sms.encodeMms(mmsInformation);
promise.then(data => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册