提交 d5af437f 编写于 作者: D dingxiaochen

fix readme.

Signed-off-by: Ndingxiaochen <dingxiaochen@huawei.com>
上级 21a6a4a2
......@@ -710,7 +710,7 @@ setShowName\(slotId: number, name: string,callback: AsyncCallback<void\>\): void
**示例:**
```js
let 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
let name = '中国移动';
let name = "中国移动";
let promise = sim.setShowName(0, name);
promise.then(data => {
console.log(`setShowName success, promise: data->${JSON.stringify(data)}`);
......@@ -1097,7 +1097,7 @@ setLockState(slotId: number, options: LockInfo, callback: AsyncCallback<LockStat
```js
let lockInfo = {
lockType: sim.LockType.PIN_LOCK,
password = "1234",
password: "1234",
state: sim.LockState.LOCK_OFF
};
sim.setLockState(0, lockInfo, (err, data) => {
......@@ -1136,7 +1136,7 @@ setLockState(slotId: number, options: LockInfo): Promise<LockStatusResponse\>
```js
let lockInfo = {
lockType: sim.LockType.PIN_LOCK,
password = "1234",
password: "1234",
state: sim.LockState.LOCK_OFF
};
let promise = sim.setLockState(0, lockInfo);
......@@ -2602,8 +2602,8 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo, callback: AsyncCallback<L
```js
let persoLockInfo = {
lockType = sim.PersoLockType.PN_PIN_LOCK,
password = "1234"
lockType: sim.PersoLockType.PN_PIN_LOCK,
password: "1234"
};
sim.unlockSimLock(0, persoLockInfo, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
......@@ -2640,8 +2640,8 @@ unlockSimLock(slotId: number, lockInfo: PersoLockInfo): Promise<LockStatusRespon
```js
let persoLockInfo = {
lockType = sim.PersoLockType.PN_PIN_LOCK,
password = "1234"
lockType: sim.PersoLockType.PN_PIN_LOCK,
password: "1234"
};
let promise = sim.unlockSimLock(0, persoLockInfo);
promise.then(data => {
......
......@@ -610,8 +610,8 @@ let updateSimMessageOptions = {
slotId: 0,
msgIndex: 1,
newStatus: sms.SimMessageStatus.SIM_MESSAGE_STATUS_FREE,
pdu = "xxxxxxx",
smsc = "test"
pdu: "xxxxxxx",
smsc: "test"
};
sms.updateSimMessage(updateSimMessageOptions, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
......@@ -650,8 +650,8 @@ let updateSimMessageOptions = {
slotId: 0,
msgIndex: 1,
newStatus: sms.SimMessageStatus.SIM_MESSAGE_STATUS_FREE,
pdu = "xxxxxxx",
smsc = "test"
pdu: "xxxxxxx",
smsc: "test"
};
let promise = sms.updateSimMessage(updateSimMessageOptions);
promise.then(data => {
......@@ -1054,13 +1054,13 @@ encodeMms(mms: MmsInformation, callback: AsyncCallback<Array<number\>>): void
```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
};
sms.encodeMms(mmsInformation, (err, data) => {
console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
......@@ -1096,10 +1096,10 @@ encodeMms(mms: MmsInformation): Promise<Array<number\>>
let mmsAcknowledgeInd = {
transactionId: "100",
version: sms.MmsVersionType.MMS_VERSION_1_0,
reportAllowed = sms.ReportType.MMS_YES
reportAllowed: sms.ReportType.MMS_YES
};
let mmsInformation = {
messageType: sms.MessageType.TYPE_MMS_ACKNOWLEDGE_IND,
messageType: sms.MessageType.TYPE_MMS_ACKNOWLEDGE_IND,
mmsType: mmsAcknowledgeInd
};
let promise = sms.encodeMms(mmsInformation);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册