diff --git a/zh-cn/application-dev/reference/apis/js-apis-ability-context.md b/zh-cn/application-dev/reference/apis/js-apis-ability-context.md index f834060bd898647d06fc810281923bde08a42fd7..6885ce1bbcba6b24ffffe7f1535558f31c5f153d 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-ability-context.md +++ b/zh-cn/application-dev/reference/apis/js-apis-ability-context.md @@ -127,7 +127,7 @@ startAbility(want: Want, options?: StartOptions): Promise<void>; windowMode: 0, }; this.context.startAbility(want, options) - .then((data) => { + .then(() => { console.log('Operation successful.') }).catch((error) => { console.log('Operation failed.'); @@ -407,8 +407,8 @@ startServiceExtensionAbility(want: Want): Promise\; "abilityName": "MainAbility" }; this.context.startServiceExtensionAbility(want) - .then((data) => { - console.log('---------- startServiceExtensionAbility success, data: -----------', data); + .then(() => { + console.log('---------- startServiceExtensionAbility success -----------'); }) .catch((err) => { console.log('---------- startServiceExtensionAbility fail, err: -----------', err); @@ -477,8 +477,8 @@ startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\ }; var accountId = 100; this.context.startServiceExtensionAbilityWithAccount(want,accountId) - .then((data) => { - console.log('---------- startServiceExtensionAbilityWithAccount success, data: -----------', data); + .then(() => { + console.log('---------- startServiceExtensionAbilityWithAccount success -----------'); }) .catch((err) => { console.log('---------- startServiceExtensionAbilityWithAccount fail, err: -----------', err); @@ -539,8 +539,8 @@ stopServiceExtensionAbility(want: Want): Promise\; "abilityName": "MainAbility" }; this.context.stopServiceExtensionAbility(want) - .then((data) => { - console.log('---------- stopServiceExtensionAbility success, data: -----------', data); + .then(() => { + console.log('---------- stopServiceExtensionAbility success -----------'); }) .catch((err) => { console.log('---------- stopServiceExtensionAbility fail, err: -----------', err); @@ -610,8 +610,8 @@ stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise\< }; var accountId = 100; this.context.stopServiceExtensionAbilityWithAccount(want,accountId) - .then((data) => { - console.log('---------- stopServiceExtensionAbilityWithAccount success, data: -----------', data); + .then(() => { + console.log('---------- stopServiceExtensionAbilityWithAccount success -----------'); }) .catch((err) => { console.log('---------- stopServiceExtensionAbilityWithAccount fail, err: -----------', err); @@ -658,8 +658,8 @@ terminateSelf(): Promise<void>; **示例:** ```js - this.context.terminateSelf().then((data) => { - console.log('success:' + JSON.stringify(data)); + this.context.terminateSelf().then(() => { + console.log('success'); }).catch((error) => { console.log('failed:' + JSON.stringify(error)); }); @@ -839,8 +839,8 @@ disconnectAbility(connection: number): Promise\; ```js var connectionNumber = 0; - this.context.disconnectAbility(connectionNumber).then((data) => { - console.log('disconnectAbility success, data: ', data); + this.context.disconnectAbility(connectionNumber).then(() => { + console.log('disconnectAbility success'); }).catch((err) => { console.log('disconnectAbility fail, err: ', err); }); @@ -1020,8 +1020,8 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): windowMode: 0, }; this.context.startAbilityWithAccount(want, accountId, options) - .then((data) => { - console.log('---------- startAbilityWithAccount success, data: -----------', data); + .then(() => { + console.log('---------- startAbilityWithAccount success -----------'); }) .catch((err) => { console.log('---------- startAbilityWithAccount fail, err: -----------', err); @@ -1134,8 +1134,8 @@ setMissionLabel(label: string): Promise<void> **示例:** ```js - this.context.setMissionLabel("test").then((data) => { - console.log('success:' + JSON.stringify(data)); + this.context.setMissionLabel("test").then(() => { + console.log('success'); }).catch((error) => { console.log('failed:' + JSON.stringify(error)); }); @@ -1224,8 +1224,8 @@ setMissionIcon(icon: image.PixelMap): Promise\; console.log('--------- createPixelMap fail, err: ---------', err) }); this.context.setMissionIcon(imagePixelMap) - .then((data) => { - console.log('-------------- setMissionIcon success, data: -------------', data); + .then(() => { + console.log('-------------- setMissionIcon success -------------'); }) .catch((err) => { console.log('-------------- setMissionIcon fail, err: -------------', err); diff --git a/zh-cn/application-dev/reference/apis/js-apis-notification.md b/zh-cn/application-dev/reference/apis/js-apis-notification.md index 2288f0e23c7256f13c7a8daabd37d033ed1c9fd7..cdbdbd11495bd6f5ccb499aeb008994133906ee3 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-notification.md +++ b/zh-cn/application-dev/reference/apis/js-apis-notification.md @@ -3765,7 +3765,7 @@ Notification.subscribe(subscriber, subscribeCallback); | desc | 是 | 是 | string | 否 | 通知渠道描述信息。 | | badgeFlag | 是 | 是 | boolean | 否 | 是否显示角标。 | | bypassDnd | 是 | 是 | boolean | 否 | 置是否在系统中绕过免打扰模式。 | -| lockscreenVisibility | 是 | 是 | boolean | 否 | 在锁定屏幕上显示通知的模式。 | +| lockscreenVisibility | 是 | 是 | number | 否 | 在锁定屏幕上显示通知的模式。 | | vibrationEnabled | 是 | 是 | boolean | 否 | 是否可振动。 | | sound | 是 | 是 | string | 否 | 通知提示音。 | | lightEnabled | 是 | 是 | boolean | 否 | 是否闪灯。 |