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 cdbdbd11495bd6f5ccb499aeb008994133906ee3..cdf786c406134d705a96682fce5d3f1e915defe7 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-notification.md +++ b/zh-cn/application-dev/reference/apis/js-apis-notification.md @@ -3035,9 +3035,9 @@ Notification.isNotificationSlotEnabled( ``` -## Notification.setSyncNotificationEnabledForUninstallApp9+ +## Notification.setSyncNotificationEnabledWithoutApp9+ -setSyncNotificationEnabledForUninstallApp(userId: number, enable: boolean, callback: AsyncCallback\): void +setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean, callback: AsyncCallback\): void 设置是否将通知同步到未安装应用程序的设备(callback形式)。 @@ -3061,17 +3061,17 @@ setSyncNotificationEnabledForUninstallApp(userId: number, enable: boolean, callb let userId = 100; let enable = true; -function setSyncNotificationEnabledForUninstallAppCallback(err) { - console.log('setSyncNotificationEnabledForUninstallAppCallback'); +function setSyncNotificationEnabledWithoutAppCallback(err) { + console.log('setSyncNotificationEnabledWithoutAppCallback'); } -Notification.setSyncNotificationEnabledForUninstallApp(userId, enable, setSyncNotificationEnabledForUninstallAppCallback); +Notification.setSyncNotificationEnabledWithoutApp(userId, enable, setSyncNotificationEnabledWithoutAppCallback); ``` -## Notification.setSyncNotificationEnabledForUninstallApp9+ +## Notification.setSyncNotificationEnabledWithoutApp9+ -setSyncNotificationEnabledForUninstallApp(userId: number, enable: boolean): Promise\ +setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean): Promise\ 设置是否将通知同步到未安装应用程序的设备(Promise形式)。 @@ -3094,19 +3094,19 @@ setSyncNotificationEnabledForUninstallApp(userId: number, enable: boolean): Prom let userId = 100; let enable = true; -Notification.setSyncNotificationEnabledForUninstallApp(userId, enable) +Notification.setSyncNotificationEnabledWithoutApp(userId, enable) .then((data) => { - console.log('setSyncNotificationEnabledForUninstallApp, data:', data); + console.log('setSyncNotificationEnabledWithoutApp, data:', data); }) .catch((err) => { - console.log('setSyncNotificationEnabledForUninstallApp, err:', err); + console.log('setSyncNotificationEnabledWithoutApp, err:', err); }); ``` -## Notification.getSyncNotificationEnabledForUninstallApp9+ +## Notification.getSyncNotificationEnabledWithoutApp9+ -getSyncNotificationEnabledForUninstallApp(userId: number, callback: AsyncCallback\): void +getSyncNotificationEnabledWithoutApp(userId: number, callback: AsyncCallback\): void 获取是否同步通知到未安装应用程序的设备的结果(callback形式)。 @@ -3128,17 +3128,17 @@ getSyncNotificationEnabledForUninstallApp(userId: number, callback: AsyncCallbac ```js let userId = 100; -function getSyncNotificationEnabledForUninstallAppCallback(err, data) { - console.log('getSyncNotificationEnabledForUninstallAppCallback, data: ', data); +function getSyncNotificationEnabledWithoutAppCallback(err, data) { + console.log('getSyncNotificationEnabledWithoutAppCallback, data: ', data); } -Notification.getSyncNotificationEnabledForUninstallApp(userId, getSyncNotificationEnabledForUninstallAppCallback); +Notification.getSyncNotificationEnabledWithoutApp(userId, getSyncNotificationEnabledWithoutAppCallback); ``` -## Notification.getSyncNotificationEnabledForUninstallApp9+ +## Notification.getSyncNotificationEnabledWithoutApp9+ -getSyncNotificationEnabledForUninstallApp(userId: number): Promise\ +getSyncNotificationEnabledWithoutApp(userId: number): Promise\ 获取是否同步通知到未安装应用程序的设备的结果(Promise形式)。 @@ -3165,12 +3165,12 @@ getSyncNotificationEnabledForUninstallApp(userId: number): Promise\ ```js let userId = 100; -Notification.getSyncNotificationEnabledForUninstallApp(userId) +Notification.getSyncNotificationEnabledWithoutApp(userId) .then((data) => { - console.log('getSyncNotificationEnabledForUninstallApp, data: ', data); + console.log('getSyncNotificationEnabledWithoutApp, data: ', data); }) .catch((err) => { - console.log('getSyncNotificationEnabledForUninstallApp, err: ', err); + console.log('getSyncNotificationEnabledWithoutApp, err: ', err); }); ```