提交 e87781e4 编写于 作者: F fangJinliang1

fix docs

Signed-off-by: NfangJinliang1 <fangjinliang1@huawei.com>
Change-Id: If322b603844049d2802e0c95cffda7011813dd77
上级 c9f2beec
......@@ -35,7 +35,7 @@
3. 创建WantAgentInfo信息。
场景一:创建拉起UIAbility的WantAgent的WantAgentInfo信息。
场景一:创建拉起UIAbility的WantAgent的[WantAgentInfo](../reference/apis/js-apis-inner-wantAgent-wantAgentInfo.md)信息。
```typescript
let wantAgentObj = null; // 用于保存创建成功的wantAgent对象,后续使用其完成触发的动作。
......@@ -59,7 +59,7 @@
};
```
场景二:创建发布[公共事件](../application-models/common-event-overview.md)的WantAgent的WantAgentInfo信息。
场景二:创建发布[公共事件](../application-models/common-event-overview.md)的WantAgent的[WantAgentInfo](../reference/apis/js-apis-inner-wantAgent-wantAgentInfo.md)信息。
```typescript
let wantAgentObj = null; // 用于保存创建成功的WantAgent对象,后续使用其完成触发的动作。
......
......@@ -50,7 +50,7 @@ function publishCallback(err) {
}
}
//通知Request对象
var notificationRequest = {
let notificationRequest = {
id: 1,
content: {
contentType: Notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
......@@ -60,8 +60,8 @@ var notificationRequest = {
additionalText: "test_additionalText"
}
}
}
Notification.publish(notificationRequest, publishCallback)
};
Notification.publish(notificationRequest, publishCallback);
```
......@@ -95,7 +95,7 @@ publish(request: NotificationRequest): Promise\<void\>
```js
// 通知Request对象
var notificationRequest = {
let notificationRequest = {
notificationId: 1,
content: {
contentType: Notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
......@@ -105,7 +105,7 @@ var notificationRequest = {
additionalText: "test_additionalText"
}
}
}
};
Notification.publish(notificationRequest).then(() => {
console.info("publish success");
});
......@@ -156,9 +156,9 @@ function publishCallback(err) {
}
}
// 用户ID
var userId = 1
let userId = 1;
// 通知Request对象
var notificationRequest = {
let notificationRequest = {
id: 1,
content: {
contentType: Notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
......@@ -168,7 +168,7 @@ var notificationRequest = {
additionalText: "test_additionalText"
}
}
}
};
Notification.publish(notificationRequest, userId, publishCallback);
```
......@@ -206,7 +206,7 @@ publish(request: NotificationRequest, userId: number): Promise\<void\>
**示例:**
```js
var notificationRequest = {
let notificationRequest = {
notificationId: 1,
content: {
contentType: Notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
......@@ -216,9 +216,9 @@ var notificationRequest = {
additionalText: "test_additionalText"
}
}
}
};
var userId = 1
let userId = 1;
Notification.publish(notificationRequest, userId).then(() => {
console.info("publish success");
......@@ -262,7 +262,7 @@ function cancelCallback(err) {
console.info("cancel success");
}
}
Notification.cancel(0, "label", cancelCallback)
Notification.cancel(0, "label", cancelCallback);
```
......@@ -336,7 +336,7 @@ function cancelCallback(err) {
console.info("cancel success");
}
}
Notification.cancel(0, cancelCallback)
Notification.cancel(0, cancelCallback);
```
......@@ -374,7 +374,7 @@ function cancelAllCallback(err) {
console.info("cancelAll success");
}
}
Notification.cancelAll(cancelAllCallback)
Notification.cancelAll(cancelAllCallback);
```
......@@ -444,10 +444,10 @@ function addSlotCallBack(err) {
}
}
// 通知slot对象
var notificationSlot = {
let notificationSlot = {
type: Notification.SlotType.SOCIAL_COMMUNICATION
}
Notification.addSlot(notificationSlot, addSlotCallBack)
};
Notification.addSlot(notificationSlot, addSlotCallBack);
```
......@@ -482,9 +482,9 @@ addSlot(slot: NotificationSlot): Promise\<void\>
```js
// 通知slot对象
var notificationSlot = {
let notificationSlot = {
type: Notification.SlotType.SOCIAL_COMMUNICATION
}
};
Notification.addSlot(notificationSlot).then(() => {
console.info("addSlot success");
});
......@@ -526,7 +526,7 @@ function addSlotCallBack(err) {
console.info("addSlot success");
}
}
Notification.addSlot(Notification.SlotType.SOCIAL_COMMUNICATION, addSlotCallBack)
Notification.addSlot(Notification.SlotType.SOCIAL_COMMUNICATION, addSlotCallBack);
```
......@@ -602,14 +602,14 @@ function addSlotsCallBack(err) {
}
}
// 通知slot对象
var notificationSlot = {
let notificationSlot = {
type: Notification.SlotType.SOCIAL_COMMUNICATION
}
};
// 通知slot array 对象
var notificationSlotArray = new Array();
let notificationSlotArray = new Array();
notificationSlotArray[0] = notificationSlot;
Notification.addSlots(notificationSlotArray, addSlotsCallBack)
Notification.addSlots(notificationSlotArray, addSlotsCallBack);
```
......@@ -644,11 +644,11 @@ addSlots(slots: Array\<NotificationSlot\>): Promise\<void\>
```js
// 通知slot对象
var notificationSlot = {
let notificationSlot = {
type: Notification.SlotType.SOCIAL_COMMUNICATION
}
};
// 通知slot array 对象
var notificationSlotArray = new Array();
let notificationSlotArray = new Array();
notificationSlotArray[0] = notificationSlot;
Notification.addSlots(notificationSlotArray).then(() => {
......@@ -692,8 +692,8 @@ function getSlotCallback(err,data) {
console.info("getSlot success");
}
}
var slotType = Notification.SlotType.SOCIAL_COMMUNICATION;
Notification.getSlot(slotType, getSlotCallback)
let slotType = Notification.SlotType.SOCIAL_COMMUNICATION;
Notification.getSlot(slotType, getSlotCallback);
```
......@@ -729,7 +729,7 @@ getSlot(slotType: SlotType): Promise\<NotificationSlot\>
**示例:**
```js
var slotType = Notification.SlotType.SOCIAL_COMMUNICATION;
let slotType = Notification.SlotType.SOCIAL_COMMUNICATION;
Notification.getSlot(slotType).then((data) => {
console.info("getSlot success, data: " + JSON.stringify(data));
});
......@@ -770,7 +770,7 @@ function getSlotsCallback(err,data) {
console.info("getSlots success");
}
}
Notification.getSlots(getSlotsCallback)
Notification.getSlots(getSlotsCallback);
```
......@@ -841,8 +841,8 @@ function removeSlotCallback(err) {
console.info("removeSlot success");
}
}
var slotType = Notification.SlotType.SOCIAL_COMMUNICATION;
Notification.removeSlot(slotType,removeSlotCallback)
let slotType = Notification.SlotType.SOCIAL_COMMUNICATION;
Notification.removeSlot(slotType,removeSlotCallback);
```
......@@ -872,7 +872,7 @@ removeSlot(slotType: SlotType): Promise\<void\>
**示例:**
```js
var slotType = Notification.SlotType.SOCIAL_COMMUNICATION;
let slotType = Notification.SlotType.SOCIAL_COMMUNICATION;
Notification.removeSlot(slotType).then(() => {
console.info("removeSlot success");
});
......@@ -912,7 +912,7 @@ function removeAllCallBack(err) {
console.info("removeAllSlots success");
}
}
Notification.removeAllSlots(removeAllCallBack)
Notification.removeAllSlots(removeAllCallBack);
```
......@@ -982,9 +982,9 @@ function setNotificationEnablenCallback(err) {
console.info("setNotificationEnablenCallback success");
}
}
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.setNotificationEnable(bundle, false, setNotificationEnablenCallback);
```
......@@ -1021,9 +1021,9 @@ setNotificationEnable(bundle: BundleOption, enable: boolean): Promise\<void\>
**示例:**
```js
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.setNotificationEnable(bundle, false).then(() => {
console.info("setNotificationEnable success");
});
......@@ -1069,9 +1069,9 @@ function isNotificationEnabledCallback(err, data) {
console.info("isNotificationEnabled success");
}
}
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.isNotificationEnabled(bundle, isNotificationEnabledCallback);
```
......@@ -1113,9 +1113,9 @@ isNotificationEnabled(bundle: BundleOption): Promise\<boolean\>
**示例:**
```js
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.isNotificationEnabled(bundle).then((data) => {
console.info("isNotificationEnabled success, data: " + JSON.stringify(data));
});
......@@ -1247,9 +1247,9 @@ function displayBadgeCallback(err) {
console.info("displayBadge success");
}
}
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.displayBadge(bundle, false, displayBadgeCallback);
```
......@@ -1286,9 +1286,9 @@ displayBadge(bundle: BundleOption, enable: boolean): Promise\<void\>
**示例:**
```js
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.displayBadge(bundle, false).then(() => {
console.info("displayBadge success");
});
......@@ -1334,9 +1334,9 @@ function isBadgeDisplayedCallback(err, data) {
console.info("isBadgeDisplayed success");
}
}
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.isBadgeDisplayed(bundle, isBadgeDisplayedCallback);
```
......@@ -1378,9 +1378,9 @@ isBadgeDisplayed(bundle: BundleOption): Promise\<boolean\>
**示例:**
```js
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.isBadgeDisplayed(bundle).then((data) => {
console.info("isBadgeDisplayed success, data: " + JSON.stringify(data));
});
......@@ -1429,12 +1429,12 @@ function setSlotByBundleCallback(err) {
console.info("setSlotByBundle success");
}
}
var bundle = {
let bundle = {
bundle: "bundleName1",
}
var notificationSlot = {
};
let notificationSlot = {
type: Notification.SlotType.SOCIAL_COMMUNICATION
}
};
Notification.setSlotByBundle(bundle, notificationSlot, setSlotByBundleCallback);
```
......@@ -1471,12 +1471,12 @@ setSlotByBundle(bundle: BundleOption, slot: NotificationSlot): Promise\<void\>
**示例:**
```js
var bundle = {
let bundle = {
bundle: "bundleName1",
}
var notificationSlot = {
};
let notificationSlot = {
type: Notification.SlotType.SOCIAL_COMMUNICATION
}
};
Notification.setSlotByBundle(bundle, notificationSlot).then(() => {
console.info("setSlotByBundle success");
});
......@@ -1522,9 +1522,9 @@ function getSlotsByBundleCallback(err, data) {
console.info("getSlotsByBundle success");
}
}
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.getSlotsByBundle(bundle, getSlotsByBundleCallback);
```
......@@ -1566,9 +1566,9 @@ getSlotsByBundle(bundle: BundleOption): Promise<Array\<NotificationSlot\>>
**示例:**
```js
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.getSlotsByBundle(bundle).then((data) => {
console.info("getSlotsByBundle success, data: " + JSON.stringify(data));
});
......@@ -1614,9 +1614,9 @@ function getSlotNumByBundleCallback(err, data) {
console.info("getSlotNumByBundle success");
}
}
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.getSlotNumByBundle(bundle, getSlotNumByBundleCallback);
```
......@@ -1658,9 +1658,9 @@ getSlotNumByBundle(bundle: BundleOption): Promise\<number\>
**示例:**
```js
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.getSlotNumByBundle(bundle).then((data) => {
console.info("getSlotNumByBundle success, data: " + JSON.stringify(data));
});
......@@ -1921,7 +1921,7 @@ function cancelGroupCallback(err) {
}
}
var groupName = "GroupName";
let groupName = "GroupName";
Notification.cancelGroup(groupName, cancelGroupCallback);
```
......@@ -1953,7 +1953,7 @@ cancelGroup(groupName: string): Promise\<void\>
**示例:**
```js
var groupName = "GroupName";
let groupName = "GroupName";
Notification.cancelGroup(groupName).then(() => {
console.info("cancelGroup success");
});
......@@ -2001,8 +2001,8 @@ function removeGroupByBundleCallback(err) {
}
}
var bundleOption = {bundle: "Bundle"};
var groupName = "GroupName";
let bundleOption = {bundle: "Bundle"};
let groupName = "GroupName";
Notification.removeGroupByBundle(bundleOption, groupName, removeGroupByBundleCallback);
```
......@@ -2040,8 +2040,8 @@ removeGroupByBundle(bundle: BundleOption, groupName: string): Promise\<void\>
**示例:**
```js
var bundleOption = {bundle: "Bundle"};
var groupName = "GroupName";
let bundleOption = {bundle: "Bundle"};
let groupName = "GroupName";
Notification.removeGroupByBundle(bundleOption, groupName).then(() => {
console.info("removeGroupByBundle success");
});
......@@ -2087,11 +2087,11 @@ function setDoNotDisturbDateCallback(err) {
}
}
var doNotDisturbDate = {
let doNotDisturbDate = {
type: Notification.DoNotDisturbType.TYPE_ONCE,
begin: new Date(),
end: new Date(2021, 11, 15, 18, 0)
}
};
Notification.setDoNotDisturbDate(doNotDisturbDate, setDoNotDisturbDateCallback);
```
......@@ -2127,11 +2127,11 @@ setDoNotDisturbDate(date: DoNotDisturbDate): Promise\<void\>
**示例:**
```js
var doNotDisturbDate = {
let doNotDisturbDate = {
type: Notification.DoNotDisturbType.TYPE_ONCE,
begin: new Date(),
end: new Date(2021, 11, 15, 18, 0)
}
};
Notification.setDoNotDisturbDate(doNotDisturbDate).then(() => {
console.info("setDoNotDisturbDate success");
});
......@@ -2178,13 +2178,13 @@ function setDoNotDisturbDateCallback(err) {
}
}
var doNotDisturbDate = {
let doNotDisturbDate = {
type: Notification.DoNotDisturbType.TYPE_ONCE,
begin: new Date(),
end: new Date(2021, 11, 15, 18, 0)
}
};
var userId = 1
let userId = 1;
Notification.setDoNotDisturbDate(doNotDisturbDate, userId, setDoNotDisturbDateCallback);
```
......@@ -2222,13 +2222,13 @@ setDoNotDisturbDate(date: DoNotDisturbDate, userId: number): Promise\<void\>
**示例:**
```js
var doNotDisturbDate = {
let doNotDisturbDate = {
type: Notification.DoNotDisturbType.TYPE_ONCE,
begin: new Date(),
end: new Date(2021, 11, 15, 18, 0)
}
};
var userId = 1
let userId = 1;
Notification.setDoNotDisturbDate(doNotDisturbDate, userId).then(() => {
console.info("setDoNotDisturbDate success");
......@@ -2352,7 +2352,7 @@ function getDoNotDisturbDateCallback(err,data) {
}
}
var userId = 1
let userId = 1;
Notification.getDoNotDisturbDate(userId, getDoNotDisturbDateCallback);
```
......@@ -2395,7 +2395,7 @@ getDoNotDisturbDate(userId: number): Promise\<DoNotDisturbDate\>
**示例:**
```js
var userId = 1
let userId = 1;
Notification.getDoNotDisturbDate(userId).then((data) => {
console.info("getDoNotDisturbDate success, data: " + JSON.stringify(data));
......@@ -2508,7 +2508,7 @@ isSupportTemplate(templateName: string, callback: AsyncCallback\<boolean\>): voi
**示例:**
```javascript
var templateName = 'process';
let templateName = 'process';
function isSupportTemplateCallback(err, data) {
if (err) {
console.info("isSupportTemplate failed " + JSON.stringify(err));
......@@ -2554,7 +2554,7 @@ isSupportTemplate(templateName: string): Promise\<boolean\>
**示例:**
```javascript
var templateName = 'process';
let templateName = 'process';
Notification.isSupportTemplate(templateName).then((data) => {
console.info("isSupportTemplate success, data: " + JSON.stringify(data));
......@@ -2666,7 +2666,7 @@ function setDistributedEnableCallback() {
}
};
var enable = true
let enable = true;
Notification.setDistributedEnable(enable, setDistributedEnableCallback);
```
......@@ -2703,7 +2703,7 @@ setDistributedEnable(enable: boolean): Promise\<void>
**示例:**
```javascript
var enable = true
let enable = true;
Notification.setDistributedEnable(enable).then(() => {
console.info("setDistributedEnable success");
......@@ -2824,11 +2824,11 @@ function setDistributedEnableByBundleCallback(err) {
}
};
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
var enable = true
let enable = true
Notification.setDistributedEnableByBundle(bundle, enable, setDistributedEnableByBundleCallback);
```
......@@ -2867,11 +2867,11 @@ setDistributedEnableByBundle(bundle: BundleOption, enable: boolean): Promise\<vo
**示例:**
```javascript
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
var enable = true
let enable = true
Notification.setDistributedEnableByBundle(bundle, enable).then(() => {
console.info("setDistributedEnableByBundle success");
......@@ -2918,9 +2918,9 @@ function isDistributedEnabledByBundleCallback(data) {
}
};
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.isDistributedEnabledByBundle(bundle, isDistributedEnabledByBundleCallback);
```
......@@ -2964,9 +2964,9 @@ isDistributedEnabledByBundle(bundle: BundleOption): Promise\<boolean>
**示例:**
```javascript
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
Notification.isDistributedEnabledByBundle(bundle).then((data) => {
console.info("isDistributedEnabledByBundle success, data: " + JSON.stringify(data));
......@@ -3096,9 +3096,9 @@ function callback(err) {
}
}
// 被代理应用的包名
let representativeBundle = "com.example.demo"
let representativeBundle = "com.example.demo";
// 用户ID
let userId = 100
let userId = 100;
// NotificationRequest对象
let request = {
id: 1,
......@@ -3110,7 +3110,7 @@ let request = {
additionalText: "test_additionalText"
}
}
}
};
Notification.publishAsBundle(request, representativeBundle, userId, callback);
```
......@@ -3152,11 +3152,11 @@ publishAsBundle(request: NotificationRequest, representativeBundle: string, user
```js
// 被代理应用的包名
let representativeBundle = "com.example.demo"
let representativeBundle = "com.example.demo";
// 用户ID
let userId = 100
let userId = 100;
// NotificationRequest对象
var request = {
let request = {
id: 1,
content: {
contentType: Notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
......@@ -3166,7 +3166,7 @@ var request = {
additionalText: "test_additionalText"
}
}
}
};
Notification.publishAsBundle(request, representativeBundle, userId).then(() => {
console.info("publishAsBundle success");
......@@ -3218,9 +3218,9 @@ function cancelAsBundleCallback(err) {
}
}
// 被代理应用的包名
let representativeBundle = "com.example.demo"
let representativeBundle = "com.example.demo";
// 用户ID
let userId = 100
let userId = 100;
Notification.cancelAsBundle(0, representativeBundle, userId, cancelAsBundleCallback);
```
......@@ -3261,9 +3261,9 @@ cancelAsBundle(id: number, representativeBundle: string, userId: number): Promis
```js
// 被代理应用的包名
let representativeBundle = "com.example.demo"
let representativeBundle = "com.example.demo";
// 用户ID
let userId = 100
let userId = 100;
Notification.cancelAsBundle(0, representativeBundle, userId).then(() => {
console.info("cancelAsBundle success");
......
......@@ -56,12 +56,12 @@ function subscribeCallback(err) {
function onConsumeCallback(data) {
console.info("Consume callback: " + JSON.stringify(data));
}
var subscriber = {
let subscriber = {
onConsume: onConsumeCallback
}
var info = {
};
let info = {
bundleNames: ["bundleName1","bundleName2"]
}
};
NotificationSubscribe.subscribe(subscriber, info, subscribeCallback);
```
......@@ -107,9 +107,9 @@ function subscribeCallback(err) {
function onConsumeCallback(data) {
console.info("Consume callback: " + JSON.stringify(data));
}
var subscriber = {
let subscriber = {
onConsume: onConsumeCallback
}
};
NotificationSubscribe.subscribe(subscriber, subscribeCallback);
```
......@@ -148,7 +148,7 @@ subscribe(subscriber: NotificationSubscriber, info?: NotificationSubscribeInfo):
function onConsumeCallback(data) {
console.info("Consume callback: " + JSON.stringify(data));
}
var subscriber = {
let subscriber = {
onConsume: onConsumeCallback
};
NotificationSubscribe.subscribe(subscriber).then(() => {
......@@ -198,9 +198,9 @@ function unsubscribeCallback(err) {
function onDisconnectCallback(data) {
console.info("Cancel callback: " + JSON.stringify(data));
}
var subscriber = {
let subscriber = {
onDisconnect: onDisconnectCallback
}
};
NotificationSubscribe.unsubscribe(subscriber, unsubscribeCallback);
```
......@@ -238,7 +238,7 @@ unsubscribe(subscriber: NotificationSubscriber): Promise\<void\>
function onDisconnectCallback(data) {
console.info("Cancel callback: " + JSON.stringify(data));
}
var subscriber = {
let subscriber = {
onDisconnect: onDisconnectCallback
};
NotificationSubscribe.unsubscribe(subscriber).then(() => {
......@@ -289,14 +289,14 @@ function removeCallback(err) {
console.info("remove success");
}
}
var bundle = {
let bundle = {
bundle: "bundleName1",
}
var notificationKey = {
};
let notificationKey = {
id: 0,
label: "label",
}
var reason = NotificationSubscribe.RemoveReason.CLICK_REASON_REMOVE;
};
let reason = NotificationSubscribe.RemoveReason.CLICK_REASON_REMOVE;
NotificationSubscribe.remove(bundle, notificationKey, reason, removeCallback);
```
......@@ -335,14 +335,14 @@ remove(bundle: BundleOption, notificationKey: NotificationKey, reason: RemoveRea
**示例:**
```js
var bundle = {
let bundle = {
bundle: "bundleName1",
}
var notificationKey = {
};
let notificationKey = {
id: 0,
label: "label",
}
var reason = NotificationSubscribe.RemoveReason.CLICK_REASON_REMOVE;
};
let reason = NotificationSubscribe.RemoveReason.CLICK_REASON_REMOVE;
NotificationSubscribe.remove(bundle, notificationKey, reason).then(() => {
console.info("remove success");
});
......@@ -382,7 +382,7 @@ remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback\<void\>):
**示例:**
```js
var hashCode = 'hashCode'
let hashCode = 'hashCode';
function removeCallback(err) {
if (err) {
......@@ -391,7 +391,7 @@ function removeCallback(err) {
console.info("remove success");
}
}
var reason = NotificationSubscribe.RemoveReason.CANCEL_REASON_REMOVE;
let reason = NotificationSubscribe.RemoveReason.CANCEL_REASON_REMOVE;
NotificationSubscribe.remove(hashCode, reason, removeCallback);
```
......@@ -428,8 +428,8 @@ remove(hashCode: string, reason: RemoveReason): Promise\<void\>
**示例:**
```js
var hashCode = 'hashCode'
var reason = NotificationSubscribe.RemoveReason.CLICK_REASON_REMOVE;
let hashCode = 'hashCode';
let reason = NotificationSubscribe.RemoveReason.CLICK_REASON_REMOVE;
NotificationSubscribe.remove(hashCode, reason).then(() => {
console.info("remove success");
});
......@@ -475,9 +475,9 @@ function removeAllCallback(err) {
console.info("removeAll success");
}
}
var bundle = {
let bundle = {
bundle: "bundleName1",
}
};
NotificationSubscribe.removeAll(bundle, removeAllCallback);
```
......@@ -600,7 +600,7 @@ function removeAllCallback(err) {
}
}
var userId = 1
let userId = 1;
NotificationSubscribe.removeAll(userId, removeAllCallback);
```
......@@ -643,7 +643,7 @@ function removeAllCallback(err) {
}
}
var userId = 1
let userId = 1;
NotificationSubscribe.removeAll(userId, removeAllCallback);
```
......@@ -689,7 +689,7 @@ function onConsumeCallback(data) {
console.info('===> onConsume callback req.id:' + req.id);
};
var subscriber = {
let subscriber = {
onConsume: onConsumeCallback
};
......@@ -729,7 +729,7 @@ function onCancelCallback(data) {
console.info('===> onCancel callback req.id:' + req.id);
}
var subscriber = {
let subscriber = {
onCancel: onCancelCallback
};
......@@ -767,7 +767,7 @@ function onUpdateCallback(map) {
console.info('===> onUpdateCallback map:' + JSON.stringify(map));
}
var subscriber = {
let subscriber = {
onUpdate: onUpdateCallback
};
......@@ -799,7 +799,7 @@ function onConnectCallback() {
console.info('===> onConnect in test');
}
var subscriber = {
let subscriber = {
onConnect: onConnectCallback
};
......@@ -841,7 +841,7 @@ function onDisconnectCallback() {
console.info('===> onDisconnect in test');
}
var subscriber = {
let subscriber = {
onConnect: onConnectCallback,
onDisconnect: onDisconnectCallback
};
......@@ -877,7 +877,7 @@ function onDestroyCallback() {
console.info('===> onDestroy in test');
}
var subscriber = {
let subscriber = {
onDestroy: onDestroyCallback
};
......@@ -915,7 +915,7 @@ function onDoNotDisturbDateChangeCallback(mode) {
console.info('===> onDoNotDisturbDateChange:' + mode);
}
var subscriber = {
let subscriber = {
onDoNotDisturbDateChange: onDoNotDisturbDateChangeCallback
};
......@@ -956,7 +956,7 @@ function onEnabledNotificationChangedCallback(callbackData) {
console.info("enable: ", callbackData.enable);
};
var subscriber = {
let subscriber = {
onEnabledNotificationChanged: onEnabledNotificationChangedCallback
};
......
......@@ -59,9 +59,9 @@ export default {
clickAction: {
bundleName: 'com.example.testapp',
abilityName: 'notificationDemo',
uri: '/path/to/notification',
},
uri: '/path/to/notification'
}
});
},
}
}
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册