diff --git a/App.vue b/App.vue index d9ad1a5..ce9acc9 100644 --- a/App.vue +++ b/App.vue @@ -391,16 +391,24 @@ }, getNotificationEnabled() { if (uni.getSystemInfoSync().platform == "ios") { - if (!jpushModule.requestNotificationAuthorization) return; + if (!jpushModule.requestNotificationAuthorization) { + console.log('JPush requestNotificationAuthorization is unavailable'); + return; + } jpushModule.requestNotificationAuthorization((result) => { + console.log('JPush notification authorization:', JSON.stringify(result)); let status = result.status if (status < 2) { this.noticMsgTool() } }) } else { - if (!jpushModule.isNotificationEnabled) return; + if (!jpushModule.isNotificationEnabled) { + console.log('JPush isNotificationEnabled is unavailable'); + return; + } jpushModule.isNotificationEnabled((result) => { + console.log('JPush notification enabled:', JSON.stringify(result)); if (result.code == 0) { this.noticMsgTool() } diff --git a/manifest.json b/manifest.json index 6177f25..e2cdfc3 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,8 @@ /* 模块配置 */ "modules" : { "Camera" : {}, - "Bluetooth" : {} + "Bluetooth" : {}, + "Push" : {} }, /* 应用发布信息 */ "distribute" : {