提交 5b29e474 编写于 作者: F fangJinliang1

doc update

Signed-off-by: NfangJinliang1 <fangjinliang1@huawei.com>
上级 efec8c36
...@@ -126,7 +126,7 @@ var options = { ...@@ -126,7 +126,7 @@ var options = {
windowMode: 0, windowMode: 0,
}; };
this.context.startAbility(want, options) this.context.startAbility(want, options)
.then((data) => { .then(() => {
console.log('Operation successful.') console.log('Operation successful.')
}).catch((error) => { }).catch((error) => {
console.log('Operation failed.'); console.log('Operation failed.');
...@@ -273,7 +273,7 @@ var options = { ...@@ -273,7 +273,7 @@ var options = {
}; };
var accountId = 11; var accountId = 11;
this.context.startAbility(want, accountId, options) this.context.startAbility(want, accountId, options)
.then((data) => { .then(() => {
console.log('Operation successful.') console.log('Operation successful.')
}).catch((error) => { }).catch((error) => {
console.log('Operation failed.'); console.log('Operation failed.');
...@@ -352,7 +352,7 @@ startAbilityForResult(want: Want, options: StartOptions): Promise&lt;AbilityResu ...@@ -352,7 +352,7 @@ startAbilityForResult(want: Want, options: StartOptions): Promise&lt;AbilityResu
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 | | want | [Want](js-apis-featureAbility.md#Want) | 是 | 启动Ability的want信息。 |
| options | StartOptions | | 启动Ability所携带的参数。 | | options | StartOptions | | 启动Ability所携带的参数。 |
**返回值** **返回值**
...@@ -511,8 +511,8 @@ terminateSelf(): Promise&lt;void&gt; ...@@ -511,8 +511,8 @@ terminateSelf(): Promise&lt;void&gt;
**示例** **示例**
```js ```js
this.context.terminateSelf(want).then((data) => { this.context.terminateSelf(want).then(() => {
console.log('success:' + JSON.stringify(data)); console.log('success:');
}).catch((error) => { }).catch((error) => {
console.log('failed:' + JSON.stringify(error)); console.log('failed:' + JSON.stringify(error));
}); });
...@@ -571,7 +571,7 @@ this.context.terminateSelfWithResult( ...@@ -571,7 +571,7 @@ this.context.terminateSelfWithResult(
{ {
want: {bundleName: "com.extreme.myapplication", abilityName: "MainAbilityDemo"}, want: {bundleName: "com.extreme.myapplication", abilityName: "MainAbilityDemo"},
resultCode: 100 resultCode: 100
}).then((result) => { }).then(() => {
console.log("terminateSelfWithResult") console.log("terminateSelfWithResult")
}) })
``` ```
...@@ -768,8 +768,8 @@ setMissionLabel(label: string): Promise\<void> ...@@ -768,8 +768,8 @@ setMissionLabel(label: string): Promise\<void>
**示例** **示例**
```js ```js
this.context.setMissionLabel("test").then((data) => { this.context.setMissionLabel("test").then(() => {
console.log('success:' + JSON.stringify(data)); console.log('success:');
}).catch((error) => { }).catch((error) => {
console.log('failed:' + JSON.stringify(error)); console.log('failed:' + JSON.stringify(error));
}); });
......
...@@ -3055,7 +3055,7 @@ Notification.subscribe(subscriber, subscribeCallback); ...@@ -3055,7 +3055,7 @@ Notification.subscribe(subscriber, subscribeCallback);
| desc | 是 | 是 | string | 否 | 通知渠道描述信息。 | | desc | 是 | 是 | string | 否 | 通知渠道描述信息。 |
| badgeFlag | 是 | 是 | boolean | 否 | 是否显示角标。 | | badgeFlag | 是 | 是 | boolean | 否 | 是否显示角标。 |
| bypassDnd | 是 | 是 | boolean | 否 | 置是否在系统中绕过免打扰模式。 | | bypassDnd | 是 | 是 | boolean | 否 | 置是否在系统中绕过免打扰模式。 |
| lockscreenVisibility | 是 | 是 | boolean | 否 | 在锁定屏幕上显示通知的模式。 | | lockscreenVisibility | 是 | 是 | number | 否 | 在锁定屏幕上显示通知的模式。 |
| vibrationEnabled | 是 | 是 | boolean | 否 | 是否可振动。 | | vibrationEnabled | 是 | 是 | boolean | 否 | 是否可振动。 |
| sound | 是 | 是 | string | 否 | 通知提示音。 | | sound | 是 | 是 | string | 否 | 通知提示音。 |
| lightEnabled | 是 | 是 | boolean | 否 | 是否闪灯。 | | lightEnabled | 是 | 是 | boolean | 否 | 是否闪灯。 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册