Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
117c446e
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
117c446e
编写于
9月 29, 2022
作者:
O
openharmony_ci
提交者:
Gitee
9月 29, 2022
浏览文件
操作
浏览文件
下载
差异文件
!10110 整改readme格式
Merge pull request !10110 from dingxiaochen/cherry-pick-1664355669
上级
f8077087
e4e9101e
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
19 addition
and
19 deletion
+19
-19
zh-cn/application-dev/reference/apis/js-apis-sim.md
zh-cn/application-dev/reference/apis/js-apis-sim.md
+8
-8
zh-cn/application-dev/reference/apis/js-apis-sms.md
zh-cn/application-dev/reference/apis/js-apis-sms.md
+11
-11
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-sim.md
浏览文件 @
117c446e
...
...
@@ -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
=>
{
...
...
zh-cn/application-dev/reference/apis/js-apis-sms.md
浏览文件 @
117c446e
...
...
@@ -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
=
0x1
0
,
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,7 +1096,7 @@ 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
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录