Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
74fd97fa
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看板
未验证
提交
74fd97fa
编写于
12月 07, 2022
作者:
O
openharmony_ci
提交者:
Gitee
12月 07, 2022
浏览文件
操作
浏览文件
下载
差异文件
!12223 【仅md格式规范】common event manager 文档修改
Merge pull request !12223 from zhuhan/event
上级
45a17e8c
54980a8e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
1 addition
and
72 deletion
+1
-72
zh-cn/application-dev/reference/apis/js-apis-commonEventManager.md
...lication-dev/reference/apis/js-apis-commonEventManager.md
+1
-72
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-commonEventManager.md
浏览文件 @
74fd97fa
...
...
@@ -197,12 +197,7 @@ publish(event: string, callback: AsyncCallback\<void>): void
|错误码ID |错误信息 |
|-----------|--------------------|
|1500001 |Want action is null |
|1500002 |sandbox application can not send common event|
|1500003 |common event send frequency too high|
|1500004 |not System services or System app|
|1500005 |subscriber can not found|
|1500006 |usreId is invalid|
|1500007 |message send error|
|1500008 |CEMS error|
|1500009 |system error|
...
...
@@ -246,16 +241,12 @@ publish(event: string, options: CommonEventPublishData, callback: AsyncCallback\
**错误码:**
|错误码ID |错误信息 |
|-----------|--------------------|
|1500001 |Want action is null |
|1500002 |sandbox application can not send common event|
|1500003 |common event send frequency too high|
|1500004 |not System services or System app|
|1500005 |subscriber can not found|
|1500006 |usreId is invalid|
|1500007 |message send error|
|1500008 |CEMS error|
|1500009 |system error|
**示例:**
...
...
@@ -307,12 +298,7 @@ publishAsUser(event: string, userId: number, callback: AsyncCallback\<void>): vo
**错误码:**
|错误码ID |错误信息 |
|-----------|--------------------|
|1500001 |Want action is null |
|1500002 |sandbox application can not send common event|
|1500003 |common event send frequency too high|
|1500004 |not System services or System app|
|1500005 |subscriber can not found|
|1500006 |usreId is invalid|
|1500007 |message send error|
|1500008 |CEMS error|
|1500009 |system error|
...
...
@@ -364,12 +350,7 @@ publishAsUser(event: string, userId: number, options: CommonEventPublishData, ca
**错误码:**
|错误码ID |错误信息 |
|-----------|--------------------|
|1500001 |Want action is null |
|1500002 |sandbox application can not send common event|
|1500003 |common event send frequency too high|
|1500004 |not System services or System app|
|1500005 |subscriber can not found|
|1500006 |usreId is invalid|
|1500007 |message send error|
|1500008 |CEMS error|
|1500009 |system error|
...
...
@@ -421,19 +402,6 @@ createSubscriber(subscribeInfo: CommonEventSubscribeInfo, callback: AsyncCallbac
| subscribeInfo |
[
CommonEventSubscribeInfo
](
#commoneventsubscribeinfo
)
| 是 | 表示订阅信息。 |
| callback | AsyncCallback
\<
[
CommonEventSubscriber
](
#commoneventsubscriber
)
> | 是 | 表示创建订阅者的回调方法。 |
**错误码:**
|错误码ID |错误信息 |
|-----------|--------------------|
|1500001 |Want action is null |
|1500002 |sandbox application can not send common event|
|1500003 |common event send frequency too high|
|1500004 |not System services or System app|
|1500005 |subscriber can not found|
|1500006 |usreId is invalid|
|1500007 |message send error|
|1500008 |CEMS error|
|1500009 |system error|
**示例:**
...
...
@@ -484,19 +452,6 @@ createSubscriber(subscribeInfo: CommonEventSubscribeInfo): Promise\<CommonEventS
| --------------------------------------------------------- | ---------------- |
| Promise
\<
[
CommonEventSubscriber
](
#commoneventsubscriber
)
> | 返回订阅者对象。 |
**错误码:**
|错误码ID |错误信息 |
|-----------|--------------------|
|1500001 |Want action is null |
|1500002 |sandbox application can not send common event|
|1500003 |common event send frequency too high|
|1500004 |not System services or System app|
|1500005 |subscriber can not found|
|1500006 |usreId is invalid|
|1500007 |message send error|
|1500008 |CEMS error|
|1500009 |system error|
**示例:**
```
ts
...
...
@@ -538,19 +493,6 @@ subscribe(subscriber: CommonEventSubscriber, callback: AsyncCallback\<CommonEven
| subscriber |
[
CommonEventSubscriber
](
#commoneventsubscriber
)
| 是 | 表示订阅者对象。 |
| callback | AsyncCallback
\<
[
CommonEventData
](
#commoneventdata
)
> | 是 | 表示接收公共事件数据的回调函数。 |
**错误码:**
|错误码ID |错误信息 |
|-----------|--------------------|
|1500001 |Want action is null |
|1500002 |sandbox application can not send common event|
|1500003 |common event send frequency too high|
|1500004 |not System services or System app|
|1500005 |subscriber can not found|
|1500006 |usreId is invalid|
|1500007 |message send error|
|1500008 |CEMS error|
|1500009 |system error|
**示例:**
```
ts
...
...
@@ -612,19 +554,6 @@ unsubscribe(subscriber: CommonEventSubscriber, callback?: AsyncCallback\<void>):
| subscriber |
[
CommonEventSubscriber
](
#commoneventsubscriber
)
| 是 | 表示订阅者对象。 |
| callback | AsyncCallback
\<
void> | 否 | 表示取消订阅的回调方法。 |
**错误码:**
|错误码ID |错误信息 |
|-----------|--------------------|
|1500001 |Want action is null |
|1500002 |sandbox application can not send common event|
|1500003 |common event send frequency too high|
|1500004 |not System services or System app|
|1500005 |subscriber can not found|
|1500006 |usreId is invalid|
|1500007 |message send error|
|1500008 |CEMS error|
|1500009 |system error|
**示例:**
```
ts
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录