提交 cb4fc2f5 编写于 作者: zyjhandsome's avatar zyjhandsome

发送通知的notificationRequest参数增加notificationManager.NotificationRequest类型

Signed-off-by: zyjhandsome's avatarzyjhandsome <zyjhandsome@126.com>
上级 21c5734a
......@@ -96,7 +96,7 @@
```typescript
// 构造NotificationRequest对象
let notificationRequest = {
let notificationRequest: notificationManager.NotificationRequest = {
content: {
contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
normal: {
......
......@@ -45,7 +45,7 @@
4. 构造进度条模板对象,并发布通知。
```ts
let notificationRequest = {
let notificationRequest: notificationManager.NotificationRequest = {
id: 1,
content: {
contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
......
......@@ -45,7 +45,7 @@
- 普通文本类型通知由标题、文本内容和附加信息三个字段组成,其中标题和文本内容是必填字段,大小均需要小于200字节。
```ts
let notificationRequest = {
let notificationRequest: notificationManager.NotificationRequest = {
id: 1,
content: {
contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, // 普通文本类型通知
......@@ -71,7 +71,7 @@
- 长文本类型通知继承了普通文本类型的字段,同时新增了长文本内容、内容概要和通知展开时的标题,其中长文本内容不超过1024字节,其他字段小于200字节。通知默认显示与普通文本相同,展开后,标题显示为展开后标题内容,内容为长文本内容。
```ts
let notificationRequest = {
let notificationRequest: notificationManager.NotificationRequest = {
id: 1,
content: {
contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_LONG_TEXT, // 长文本类型通知
......@@ -101,7 +101,7 @@
- 多行文本类型通知继承了普通文本类型的字段,同时新增了多行文本内容、内容概要和通知展开时的标题,其字段均小于200字节。通知默认显示与普通文本相同,展开后,标题显示为展开后标题内容,多行文本内容多行显示。
```ts
let notificationRequest = {
let notificationRequest: notificationManager.NotificationRequest = {
id: 1,
content: {
contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_MULTILINE, // 多行文本类型通知
......@@ -131,7 +131,7 @@
```ts
let notificationPicture: PixelMap = undefined; // 需要获取图片PixelMap信息
let notificationRequest = {
let notificationRequest: notificationManager.NotificationRequest = {
id: 1,
content: {
contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_PICTURE,
......
......@@ -50,7 +50,7 @@ function publishCallback(err) {
}
}
//通知Request对象
let notificationRequest = {
let notificationRequest: notificationManager.NotificationRequest = {
id: 1,
content: {
contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
......@@ -93,7 +93,7 @@ publish(request: NotificationRequest): Promise\<void\>
```ts
// 通知Request对象
let notificationRequest = {
let notificationRequest: notificationManager.NotificationRequest = {
notificationId: 1,
content: {
contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
......@@ -156,7 +156,7 @@ function publishCallback(err) {
// 用户ID
let userId = 1;
// 通知Request对象
let notificationRequest = {
let notificationRequest: notificationManager.NotificationRequest = {
id: 1,
content: {
contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
......@@ -204,7 +204,7 @@ publish(request: NotificationRequest, userId: number): Promise\<void\>
**示例:**
```ts
let notificationRequest = {
let notificationRequest: notificationManager.NotificationRequest = {
notificationId: 1,
content: {
contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册